Things on a real device will tell you…

While at the recent 360|Flex conference, some users of the my conference app on the Samsung Galaxy Nexus S were having display issues. There was something causing the width variable to be set incorrectly, and thus all the alignment code to be wrong.

This was puzzling, I had checked the application on my Xoom, and the alignment code worked fine.  So, during lunch I borrowed a device and took a look at what was going on. The application is written pure ActionScript (no Flex Mobile), and the stage is set to a standard 480 by 800 pixels.

During the init process I set theAppWidth = this.stage.stageWidth and theAppHeight = this.stage.stageHeight. This had returned the device width and height on the devices I had tested on. But on the Nexus S the code was returning 480 by 800, and not 720 by 1184. Hum….

So, I changed the code to reference this.stage.fullScreenWidth and this.stage.fullScreenHeight. This did return the correct values, and thus alignment code was working again.

The moral of this story is that you have to spend time (and money) to have a collection of real devices to test on.

Thanks again to Doug Arthur for letting borrow his device to resolve this.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s