android:

Mobile Browser Reported Screen Sizes – Jan 2012

0

HTML5 / CSS3 development for mobile browsers needs to be aware of the reported screen size to effectively build a mobile site.

However, the screen resolution listed in the device specifications is NOT the same as what is reported by the mobile browser itself. Specifically, what is the window size information available via JavaScript using window.innerWidth and window.innerHeight. It is usually very different than the device’s screen resolution.

The iPhone and iPad are consistent and predictable. All iPhones report a window size of 320 x 460, and all iPads report a window size of 768 x 1004.

The ‘fun’ part is supporting the wide variety of window sizes on Android devices. However, it is exceptionally hard to find data on the window size different devices report via JavaScript.

A month ago I released a mobile app for Android and iOS called ScoreKeepr. During the update check to my server, the app reports the device’s windows size.

Here are the most common reported screen sizes for Android devices (in Portrait orientation):

Android phones
320 px width – 90% of devices queried
360 px width – 10% of devices queried

Android tablets
800 px width – 1 device reporting (insufficient data)

Using this information, you can more easily develop your CSS media queries, knowing what sizes your app is likely to encounter in the wild.

This will be an ongoing monthly report, and will reflect different reported window sizes when new devices are introduced. By regularly reporting this information, a trend over time can be identified.

What information are you collecting from your apps? Please share your suggestions for additional anonymous information to collect. Information must be available via JavaScript query.

UPDATE FEB 1st: final numbers for January 2012 included


Continue Reading

Android 2.3 ‘Gingerbread’ WebSocket support

2

Android 2.3 Gingerbread beta was recently released to developers.

The Android 2.3 SDK information does not mention a browser upgrade or support for websockets specifically. So there is no official word from Google regarding websockets being included when Android 2.3 is released.

Taking a look at the beta 1 release of the Android 2.3 SDK, the browser in the emulator is the same version as in Android 2.2 FroYo. Here are screencaps from the browser in the Android 2.3 emulator and a screencap from the browser in Android 2.2. Note the browser version is the same in each screencap.

 

   

 

Considering that the browser in Android is based on the same open-source WebKit browser used in the iPhone and iPad, and Apple recently released websocket support in iOS 4.2, it is reasonable to predict that Google will include websocket support in the Android browser very soon, and hopefully in Android 2.3.

I posted this question to Quora. We’ll see if someone with more info can add to this.

Creative Commons License
Android 2.3 ‘Gingerbread’ WebSocket support by Jim Bergman is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Permissions beyond the scope of this license may be available at http://jimbergman.net/about.


Continue Reading

My iOS & Android Apps

Elsewhere on the web

Jim's book recommendations, favorite quotes, book clubs, book trivia, book lists (read shelf)

Like this page?

Popular Posts


FreshBooks



SPECIAL Offer! Save 20% off all New Hosting Plans!