Tuesday, January 15, 2013

Per App DPI: what it is and why it's so beautiful

Unless you're a serious tech geek and a veteran member of xda-developers.com, you probably have never heard of per app DPI (dots per inch). I'm gonna explain what it is, and why it makes the whole Android experience so beautiful. But before I start, I would like to say that I didn't code any of these, and full credit should be given to the people who did (see the end of thread for links).

So what's per app DPI?

It all started with Android's now famed screen-size / resolution fragmentation. What this means is, there exist a bazillion different Android devices out there and each has a different screen size and resolution, ranging from a small 3.5" phone to a 10.1" full-sized tablet. This seemed like a serious problem at first (which is why all the ifanboys were talking about Android apps being behind as the developers have to take care of all the screen sizes etc etc bs), but eventually all the good apps supported all the different screen sizes. How? By something called MultiDPI. Basically an Android app is coded in a way that within the one app, different user interfaces are displayed depending on the device's screen size and resolution. Per app DPI takes advantage of this.

Basically, per app DPI cheats each app into believing the device it's on has a different resolution. As a result, on a single phone, one can have a phone app that looks exactly like a phone app, and another app that makes the phone look like a shrunk tablet.

Why is this useful?

Per app DPI is useful in many ways. What a user can do by reducing the DPI ranges from simply displaying more onto one screen to enabling a completely different UI. I'll let the pictures do the talking:

The straight forward stuff:

Gmail: here I simply reduced the DPI slightly, thereby displaying more emails on one screen


Google+: Here once again I reduced the DPI to create a larger view area for contents


Slightly more exciting stuff:

Google Calendar: Here, by reducing the DPI and forcing tablet mode, a different interface is obtained. All within the same app, no extra download required.



Youtube: Here, the DPI is once again reduced to force tablet mode. It's a bit hard to see just by the two pictures below, but what so nice is that in the first picture (where Youtube runs under the original phone mode), the full screen version of the video is shown as soon as the phone is rotated to landscape and there's no landscape UI to speak of. In the second picture (where tablet mode is forced), the UI is a lot nicer. (Obviously full screen mode is still available via the button on the lower right corner.)



Flipboard: Flipboard recently released its tablet version and I'm one of the people who really likes it. It's obviously cool to be able to access it on my phone.


The really cool stuff:

IMDb: Here when tablet mode is forced, well, we almost get a totally different IMDb app. And hell it's a much nicer UI. The phone version is a bit all over the place, while the tablet version is just so much nicer to look at and much easier to understand.



Google Maps: Google somehow favors tablet users in their Maps app. The tablet version just makes so much more sense to have the search bar right at the top and a one-click voice search button.



Google Local: This one is just a beauty. In the phone Local app the map completely disappears. In the tablet version, the search results sit on top of the map and the user can easily see where each search result is, tying Local and Maps together.



To wrap it up, per app DPI unleashes the full potential of Android and it's all because Google allows this kind of high level modification into their operating system (while iusers can continue to live in Apple's obsessively closed system).

If you're interested in trying out per app DPI, check out Paranoid Android if you're using a Nexus device here: http://www.paranoid-rom.com/. If you have the Samsung SGS3 like I do, definitely get f0mey's null rom here: http://forum.xda-developers.com/showthread.php?t=2005845. Both the Paranoid team and f0mey have done some amazing works and for null rom, there're a bunch of devs who deserve as much credits, they're listed on the OP of the null thread. By the way, both of these require root, obviously.












Wednesday, December 19, 2012

Why Communities changed everything for Google+

A month ago, Google+ was a site left untouched, apart from sharing some family photos with family members. Today, I spend 5 times more time on Google+ compared to Facebook. And here's why.

Communities.

Google+ introduced Communities a short while ago, and it changed everything. Before, as a G+ user, I roamed in a white void of nothingness. There was no "friends" to share stuff with, because heck, no one but real geeks paid any attention to G+ after the initial "invite-only" fad. I knew there're people out there, but without an initiative, I had no reason to reach out to any of them. Communities changed all this. I was able to search on topics that interest me, from the uninspiring tech topics such as Android to actual interests such as coffee and primal diet. I was able to post on each communities different threads, and I would be getting constructive responses because the people reading them would have the same interest as me.

Here's an example, I posted a photo of a box of disposable drip coffee on both Facebook and G+'s Coffee community. On Facebook, I got the usual "cool", "what's this?" from friends and maybe friends of friends. On G+, I invoked fellow coffee lovers who provided me with actual useful insights as to how to best use this box of coffee. 

Another example, I joined this Vibram Five Fingers community, which was very new and got all but 6 members. Even with very limited action in this community, I was able to discover an online store that was doing some big discounts on VFFs. 

I think to sum it up, G+ Communities provided a channel for much deeper discussions whereas Facebook comments are either all too shallow or flame wars. 

I spend a lot of time on G+ everyday now that I have joined a good dozen or so communities. I have learned a lot in topics that interests me, and I strongly believe this is a much better use of time than browsing people's pet photos or commenting on their status of how life sucks.

I urge all of you who have given up on Google+ to give it another shot, purely in playing around with Communities. I promise that you'll be pleasantly surprised in how much an addition of one simple feature can help you learn so much more. 

(btw I don't work for Google and I get nothing for promoting their service. But I do get great gratification by knowing more people are taking advantage of this and therefore getting to learn more about stuff that they care to learn about.)

Sunday, November 18, 2012

My way of eating less meat

Lots of people talk about eating less meat, be it for a healthier life, religious reasons, or simply trying to reduce animal cruelty. But it's very hard to actually do it for someone who lives in a metropolitan, especially Hong Kong. (Hey did you know that HK ranks *drumroll* FIRST in the world in per capita meat consumption, and is 33% higher than the great US of A?) There's this whole Green Monday movement which is obviously great in trying to reduce total meat consumption by 1/7. But the problem for me is, being a guy with a family, it's very hard to go home and expect everyone else to eat veggie with me. So here's what I think is an alternative, except it's an alternative that's even better:

No meat until sunset.

My rationale is this: it's normally not very hard for a person to go meatless during breakfast. Cereals, yogurts, or just a plain coffee is a great morning starter. For someone like me, who also does intermittent fasting (no food for 16 hours intervals), this is a non issue (since I don't eat anything with calories for breakfast anyways). For lunch, a working person would either eat alone or with friends. The hard part is to find the food, and ample online resources can cater for that. If that's sorted out, eating vegetarian for lunch is pretty easy. At most cuisines there're vegetarian dishes and unless it's Chinese, most have very little sharing going on so there's no issue with causing disturbance for others. I've never had anyone question my food of choice because a four-cheese pizza or a mushroom risotto are perfectly normal food in a meat-eater's eyes.

And for dinner, meat is allowed. That'll dodge a lot of inevitable debates during family dinners. It'll also make dining out easier.

So to wrap it up, this method is clearly not as good as going 100% vegetarian but it's a good middle point, and I see it an improvement versus Green Monday since mathematically I'm getting 3.5 days meat-free (or 2.5 days even if I only do Mondays to Fridays)!