Highlighted

AIR 23 - stage.fullscreenheight / Capabilities.screenResolutionY wrong

Explorer ,
Sep 18, 2016

Copy link to clipboard

Copied

Hi there,

just upgraded to AIR 23 and I'm happy to see that the full screen feature is implemented.

Unfortunately screen.fullscreenheight and Capabilities.screenResolutionY are returning wrong values on Android with immersive Full-Screen.

I think the values returned are not reduced by the menu bar at the bottom of the device which is hidden since AIR 23.

Would be great to hear whether there is a workaround.

Best

TOPICS
Development

Views

2.6K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

AIR 23 - stage.fullscreenheight / Capabilities.screenResolutionY wrong

Explorer ,
Sep 18, 2016

Copy link to clipboard

Copied

Hi there,

just upgraded to AIR 23 and I'm happy to see that the full screen feature is implemented.

Unfortunately screen.fullscreenheight and Capabilities.screenResolutionY are returning wrong values on Android with immersive Full-Screen.

I think the values returned are not reduced by the menu bar at the bottom of the device which is hidden since AIR 23.

Would be great to hear whether there is a workaround.

Best

TOPICS
Development

Views

2.6K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 18, 2016 0
Engaged ,
Sep 19, 2016

Copy link to clipboard

Copied

As you stated, immersive full-screen in Android hides the clock bar (and on-screen nav buttons if present). In theory, the two reference values you listed should be the same because when the user swipes from the top or bottom of the screen to make the clock bar and nav bar re-appear over the apps content, but not actually resizing the windowed area of the app.

You stated that the values returned are wrong from what you expect them to be, but what are the actual values you are getting?

Also, what is it that you are hoping to achieve by getting this information? If there was a better understanding of what you are wanting to accomplish, workarounds or ideas may be able to be suggested, even if in the end it means using/creating an ANE to detect the change.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 19, 2016 0
Explorer ,
Sep 19, 2016

Copy link to clipboard

Copied

Hi there,

as I set the app to fill the full screen I was hoping to get the real device height and width by these two methods.

The clock bar is hidden since versions before AIR 23 so there is no problem.

As of version 23 the immersive full-screen feature is implemented but unfortunately AIR doesn't consider the hidden menu/navbar at the bottom so calling stage.fullscreenheight does not include the navbar height.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 19, 2016 0
Adobe Employee ,
Sep 19, 2016

Copy link to clipboard

Copied

Hi Dominik,

Thanks for reporting the issue.

I tried this issue by making a sample project using both stage.fullscreenheight and Capabilities.screenResolutionY and they are returning the same correct value, the actual height of device, Please check the full screen value is true in xml file

<fullScreen>true</fullScreen>

if still you will get wrong values so please share a sample project so we will try to reproduce at our end and help you better by providing workaround.

Regards,

Mayank

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 19, 2016 0
Explorer ,
Sep 19, 2016

Copy link to clipboard

Copied

Hi Mayank,

this is what I set in the descriptor.xml:

<aspectRatio>portrait</aspectRatio>

<autoOrients>false</autoOrients>

        <fullScreen>true</fullScreen>

        <visible>true</visible>

        <softKeyboardBehavior>none</softKeyboardBehavior>

    </initialWindow>

This is how I call the methods:

<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"

  xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView" tabBarVisible="false" actionBarVisible="false" initialize="view_initializeHandler(event)">

public var uiComp:UIComponent

  public var bgComp:UIComponent

  public static var SWF_HALF_WIDTH:int;

  public static var SWF_HEIGHT:int;

  public static var _scaleFactor:int;

  protected function view_initializeHandler(event:FlexEvent):void

  {

  bgComp = new UIComponent();

  uiComp = new UIComponent();

  addElement(bgComp);

  addElement(uiComp);

  if (stage) init();

  else addEventListener(Event.ADDED_TO_STAGE, init);

  }

  private function init(e:Event = null):void {      

  removeEventListener(Event.ADDED_TO_STAGE, init);

  this.buildBG();

  }

  public function buildBG():void{

  SWF_HALF_WIDTH = stage.fullScreenWidth/2;

  SWF_HEIGHT = stage.fullScreenHeight;

  _scaleFactor = SWF_HALF_WIDTH*2/1080;

  if(!FlexGlobals.topLevelApplication.persistenceManager.getProperty("aktuellerRang")){

  FlexGlobals.topLevelApplication.persistenceManager.setProperty("aktuellerRang", "Tellerwäscher");

  }

  /* Hintergrund Friends */

  var _theBG:bg = new bg();

  _theBG.cacheAsBitmapMatrix = new Matrix();

  var myMatrixtheBG:Matrix = _theBG.transform.matrix; 

  myMatrixtheBG.scale(SWF_HALF_WIDTH*2/(_theBG.width-1),SWF_HEIGHT/(_theBG.height-1));

  _theBG.transform.matrix = myMatrixtheBG;

  var myBitmapDatatheBG:BitmapData = new BitmapData(_theBG.width, _theBG.height, true, 0x000000);

  myBitmapDatatheBG.draw(_theBG, myMatrixtheBG, null, null, null, true);

  var bmptheBG:Bitmap = new Bitmap(myBitmapDatatheBG);

  bmptheBG.x = 0;

  bmptheBG.y = 0;

  bgComp.addChild(bmptheBG);

  var _menu:DasMenue = new DasMenue();

  uiComp.addChild(_menu);

  }

In versions before AIR 23 the whole screen was filled (because the navbar isn't hidden) and now the screen is exactly filled to the position of the bottom navbar before it is hidden. So there is a white space where the navbar was shown.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 19, 2016 1
Adobe Employee ,
Sep 20, 2016

Copy link to clipboard

Copied

Thanks for sharing the information, logged an internal issue for the same and working to fix it. We will let you know once we fix.

-Mayank

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 20, 2016 0
Explorer ,
Sep 30, 2016

Copy link to clipboard

Copied

Hi Mayank,

thx for your investigation.

I can't update my apps until this is fixed so could you give me an approx. date when this will be fixed?

Thinking of switching back to an older AIR version if this takes too long...

Thanks

Dominik

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 30, 2016 0
Adobe Employee ,
Sep 30, 2016

Copy link to clipboard

Copied

Hi Dominik,

We are currently working on your issue and will get back to you as soon as we have something for you. As of now we can't commit on the exact dates by which we will be able to provide you the fix.

Thanks,

Ankit

Adobe AIR Team

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 30, 2016 0
Explorer ,
Nov 07, 2016

Copy link to clipboard

Copied

Still no fix or update?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 07, 2016 0
Explorer ,
Nov 18, 2016

Copy link to clipboard

Copied

Too bad there is no answer / fix.

With the update of Animate CC 2017 I can not use AIR < 23

I have this bug too, the flash viewport is smaller than the device screen, so every object outside the stage is visible.

And I can not use AIR 22 anymore

Please correct it, is it fixed in AIR 24 beta ?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 18, 2016 0
Explorer ,
Dec 01, 2016

Copy link to clipboard

Copied

So after 3 months still no fix?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 01, 2016 0
Adobe Employee ,
Dec 01, 2016

Copy link to clipboard

Copied

This issue has been fixed, Please try to use latest AIR SDK build from - Download Adobe AIR 24 Beta - Adobe Labs

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 01, 2016 1
Engaged ,
Dec 04, 2016

Copy link to clipboard

Copied

For my tests with latest AIR 24.0.0.177 beta and Sony Xperia Z1 Compact (screen 720*1280 pixels), Android 5.1.1, fullscreen == true with application XML descriptor:
1) stage.fullScreenWidth and stage.fullScreenHeight returns 720*1280
correct


2) Capabilities.screenResolutionX and Capabilities.screenResolutionY returns 720*1184

wrong height!

3) (Screen.screens[0] as Screen).bounds returns (x=0, y=0, w=1184, h=720)
wrong height!

4) (Screen.screens[0] as Screen).visibleBounds returns (x=464, y=-510, w=720, h=1230)

wrong values!

Note: without this line

<fullScreen>true</fullScreen>

get screen resolution for Android device with any method above return wrong values

Only stage.fullScreenWidth and stage.fullScreenHeight with <fullScreen>true</fullScreen> in application XML descriptor returns correct values with AIR 24.0.0.177 beta.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 04, 2016 2
Adobe Employee ,
Dec 05, 2016

Copy link to clipboard

Copied

Thanks for sharing the information, we are investigating this issue.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 05, 2016 0
Explorer ,
Jan 04, 2017

Copy link to clipboard

Copied

Same problem here.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 04, 2017 0
Explorer ,
Jan 11, 2017

Copy link to clipboard

Copied

Also confirming same problem w air 24. Capabilities.screenresX/Y are wrong

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 11, 2017 0
Engaged ,
Feb 25, 2017

Copy link to clipboard

Copied

For my tests with latest AIR 25.0.0.126 beta and Sony Xperia Z1 Compact (screen 720*1280 pixels), Android 5.1.1 all works fine.


fullscreen == true with application XML descriptor:
1) stage.fullScreenWidth and stage.fullScreenHeight returns 720*1280
correct


2) Capabilities.screenResolutionX and Capabilities.screenResolutionY returns 720*1280

correct

3) (Screen.screens[0] as Screen).bounds returns (x=0, y=0, w=720, h=1280)
correct

4) (Screen.screens[0] as Screen).visibleBounds returns (x=0, y=0, w=720, h=1280)

correct

_______________________________

fullscreen == false with application XML descriptor:
1) stage.fullScreenWidth and stage.fullScreenHeight returns 720*1184
correct


2) Capabilities.screenResolutionX and Capabilities.screenResolutionY returns 720*1280

correct

3) (Screen.screens[0] as Screen).bounds returns (x=0, y=0, w=720, h=1184)
correct

4) (Screen.screens[0] as Screen).visibleBounds returns (x=0, y=50, w=720, h=1134)

correct

Get screen resolution for Android device with any method above return correct values with latest AIR 25.0.0.126 beta for my tests. Thank you, Adobe!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 25, 2017 0
Community Beginner ,
Oct 07, 2017

Copy link to clipboard

Copied

I test with Air26 and there is still a bug with stage.fullScreenWidth . I test with an iphone 5,5 and 7

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 07, 2017 0
Community Beginner ,
Oct 08, 2017

Copy link to clipboard

Copied

There are black bands on the right and left of the screen. The content can not adjust.

Apple AirSDK 27 iphone 5,5 7 FlashBuilder

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 08, 2017 0
Advocate ,
Oct 10, 2017

Copy link to clipboard

Copied

The best way to get the correct real estate values for any device is via ANE especially for Android.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 10, 2017 0
Anki_AG_ LATEST
Adobe Employee ,
Nov 17, 2017

Copy link to clipboard

Copied

Hi,

Have you tried using launch images while packaging the application for iOS?

Thanks,

Ankit | Adobe AIR Team

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 17, 2017 0