Skip navigation
Channel_24H
Currently Being Moderated

Problem with full screen on certain Android device

Aug 19, 2012 10:39 PM

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)

screen.jpg

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~

 
Replies
  • kglad
    62,004 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 20, 2012 6:57 AM   in reply to Channel_24H

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

     
    |
    Mark as:
  • kglad
    62,004 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 20, 2012 9:17 AM   in reply to Channel_24H

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

     
    |
    Mark as:
  • kglad
    62,004 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 20, 2012 3:07 PM   in reply to Channel_24H

    actually, why don't you just use stageWidth and stageHeight to scale your content?

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points