Capabilities.screenResolutionX / Y wrong on android device with onScreen button

Hi,

I think there is a little problem with Capabilities.screenResolutionX/Y when the device has no button.
For instance on my moto G (android 4.4.4) Capabilities.screenResolutionY returns 1188 when the screen’s height is actually 1280.

I solved my problem with a java extension using getRealSize() but I suppose the lime implementation is done with cpp (and I’m a bit afraid to try rebuilding lime / openfl at work at the moment, tryed once, got late for a project :grin: )

And, is there anyway simple way to know the scale factor of the stage (when streching to fit the screen) ?
And the dimensions of the scalled stage (wich are not always the same as screen size to keep ratio).

Thanks!

stage.stageWidth and stage.stageHeight should give you the actual pixels available. Just make sure to listen for RESIZE events.

Capabilities.screenResolutionX and Capabilities.screenResolutionY will return the pixels of the avaliable viewport. On Android that’s the screen-size minus the top menu. So after the menu is removed (on a full-screen app) the Capabilities.screenResolutionX/Y will change and that can be seen on the RESIZE event handler.

As said before, you should use Lib.current.stage.stageWidth/stageHeight to get the actual screen size.

Ho okay, I understand !
Thank you for your help!