How do mobile devs discover screen sizes and specifications?
April 17, 2012 5:17 PM   Subscribe

How do mobile developers detect screen sizes, types and other information about the display of various phones in the wild?

How do programmers discover screen specification information on unknown phones in the wild? In general, or specifically for Android.

I'm interested in game-like animation and heavy 2D animated graphics use.

Are there any good tricks? Different schools or techniques for different purposes?

Please feel free to talk to me like I'm a five year old program manager.
posted by loquacious to Technology (3 answers total) 3 users marked this as a favorite
Specifically for Android, if you are writing an app that will be installed on the device there are APIs you can call on the device that will return this information. See this question on Stack Overflow.

There appears to be a similar option for iPhone developers.

And basically the same thing (Stack Overflow again) for Windows Phone. I would expect there to be a similar API for any phone really.

I just googled 'android detect screen size' for this, there is lots more information available in the results. It's a pretty simple operation so I don't think there are too many tricks to it, except perhaps things like knowing whether you have added a status bar that will take away from your usable screen size, and knowing if the values get switched around if the device is in landscape mode and whether you want to handle different orientations like that.
posted by jacalata at 6:14 PM on April 17, 2012

doh, and I forgot the canonical link to the official Android developers guide to Supporting Multiple Screens. This covers resolution/dpi/etc, and also shows you how to include different layouts/image sizes for different screens, including variations for tablet-sized screens, and with the 'related' and 'linked' articles should be a very comprehensive intro.
posted by jacalata at 6:20 PM on April 17, 2012

There was this talk from the recent Breaking Development conference that covers this is in excruciating detail.

The short answer is: it depends on what you mean by screen and which browser/device you're talking about.
posted by fifteen schnitzengruben is my limit at 10:39 PM on April 17, 2012

« Older Where do the world's doctor's web surf?   |   Where to learn about the social science of... Newer »
This thread is closed to new comments.