Skip to main content
Inspiring
Dec 14, 2011 5:09 PM UTC
Question

Mobile Screen size

Is there any way to detect the mobile screen size of a device.  I know you can get the pixel capability but some phones now have HD screens with similar pixel capacity to tablets.  My galaxy nexus is displaying the tablet version but I would rather it do the phone version.  Not sure if there is any physical size we can pull to make a more intelligent decision on which layout to show.

This topic is closed to new replies. Start a new post to keep the conversation going.

4 replies

Participant
Dec 14, 2011 8:56 PM UTC

The Capabilities class provides properties that describe the screen.  I've used the dpi to help make things look correctly on these different highres smaller screens.

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/Capabilities.html

Greg

Translate
mola2alexAuthor
Inspiring
Dec 14, 2011 8:59 PM UTC

Looks promissing, I will give it a shot!  Much appreciated!

Translate
Inspiring
Dec 14, 2011 6:51 PM UTC

Hi, you can check this in stage object:

stage.fullScreenWidth and stage.fullScreenHeight

this return you the maximum width and height of device.

Translate
mola2alexAuthor
Inspiring
Dec 14, 2011 7:50 PM UTC

That returns pixels which is what I have used previously.  I am looking for physical dimensions to understand how many cm's or inches the screen is so I can format correctly.  My tablet and galaxy nexus phone have almost the same height and width in pixels but I definitely do not want the same UI to be displayed.

Translate