Skip to main content
Participant
August 20, 2012
Question

Problem with full screen on certain Android device

  • August 20, 2012
  • 1 reply
  • 2220 views

Hello, how are you guys doing?

I am fairly new to working with actionscript on mobile devices and this is the first time I post here.

It's nice to meet you all.

I am currently working on a game for both Android and iOS. So far everything works perfectly on iOS and most of the Android devices. The problem came when I tested it on a galaxy S2.

Somehow, I just could not get the game to run full screen on a galaxy S2 with Android 4.0.3. When I traced the stage width and height, it showed that the stage height was the stage height with the notification bar on even though the notification bar is gone. So when the game ran, the images seem to be in full screen correctly but there is an empty area at the bottom the size of the notification bar.

Like this: (the orientation is set to landscape)

The image were not supposed to be chopped off.

Here is the code in the main class where I did the tracing:

this.stage.scaleMode = flash.display.StageScaleMode.NO_SCALE;

                              this.stage.align = flash.display.StageAlign.TOP_LEFT;

                              this.stage.frameRate = 30;

                              this.stage.color = 0x000000;

                              stats = new Stats();

                              this.addChild(stats);

                              screenWidth = this.stage.fullScreenWidth;

                              screenHeight = this.stage.fullScreenHeight;

                              trace(screenWidth+" "+screenHeight);

                              trace(this.stage.stageWidth+" "+this.stage.stageHeight);

                              myScaleX = stage.fullScreenWidth/960;

                              myScaleY = stage.fullScreenHeight/640;

                              myStarling = new Starling(Game,stage);

                              myStarling.antiAliasing = 1;

                              myStarling.start();

The trace showed:

800 480

800 442

I had tested the same app on a Galaxy S with Android 2.3.6, an Asus Transformer, not sure what version of Android it was running on, and an iPod with Version: 5.1.1(9B206). They all worked correctly. This problem only occured on the Galaxy S2 with 4.0.3.

I really need some helps here. I hope I missed something obvious.

Thanks a lot for your time. I really appreciate any feedbacks.

Thank you~

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
August 20, 2012

use Capabilities.os to see if you can determine when you're game is installed on a problematic device.

Participant
August 20, 2012

thanks a lot for your reply~

I never tried the Capabilities class before, so can you please teach me how to detect problematic device using Capabilities class?

Thanks

kglad
Community Expert
Community Expert
August 20, 2012

assign Capabilites.os to a textfield's text and see if you can distinguish the problematic device from all others.