Skip to main content
Participant
July 29, 2014
Question

AIR for Android maximum screen size?

  • July 29, 2014
  • 1 reply
  • 1919 views

Hey folks!

Sorry if this question was already made here, but I couldn't find. Does anyone know if  AIR for Android has a maximum screen size for apps? I have this app developed for 1080p resolution, and my device (CS918 with Rockchip RK3188) is set to 1080p as well. But when I run it through FlashDevelop debug, it downsizes to 720p, still showing in fullscreen. My AIR is version 14.0.

Maybe it's my device, but since I don't have any other Android devices to test, I can't tell yet.

Thank you.

This topic has been closed for replies.

1 reply

Known Participant
July 30, 2014

Not sure if your question is why is it shrinking down to 720, or about the max Android screen size - so I'll try to answer both.

If you have "full-screen" checked when publishing, it will shrink to full-screen based on your device. If you uncheck that, it should show up in the exact resolution that you built the app in. This could be the issue with the 720, but maybe not.

I'm not sure about maximum screen size, I think that would be relevant to the device - and therefore would change as newer devices are introduced. At the moment, I have a Nexus 10 that's 2560x1600, the largest in all the devices I test with.

When I build apps, I've had the best success in doing so at iOS iPad resolution height (2048) x by the iPhone 5 width (1152) and then creating all my graphics to expand out to 1536 (iPad width). This covers all of iOS, and when published for Android, I use a formula (below, which is for portrait mode) that grabs the device screen size, and shrinks everything relatively. So in the Nexus case, it would take your current app size and blow it up to the correct resolution, inevitably cutting off some of your outside areas. You'd want to reposition them so that doesn't happen, and below it also grabs that value for you called "newWidth":

// ==============================================

// Grab the device's width & height:

var ableWidth:int = Capabilities.screenResolutionX;

var ableHeight:int = Capabilities.screenResolutionY;

var PullPct:Number = 2048/ableHeight; // Because my file is built to 2048 height

var newWidth = ableWidth*PullPct; // gets the width that I will actually be using when positioning graphics

function goScaledFullScreen() {

  var stageX = 0;

  var stageY = 0;

  var useWidth = ableWidth;

  var useHeight = ableHeight;

  //output.text = ableWidth + " x " + ableHeight; // For debugging, you can create a text field that will tell you the actual size of your device

   // Create the rectangle at the screen size, and push to that size

    var screenRectangle:Rectangle=new Rectangle(stageX,stageY,useWidth,useHeight);

    stage.fullScreenSourceRect=screenRectangle;

    stage.displayState=StageDisplayState.FULL_SCREEN;

    stage.align = StageAlign.TOP_LEFT;

}

goScaledFullScreen();

// ==============================================

In the above, I get the value "newWidth" so I can design my app to use this size when positioning elements around the screen. An example - even though the 'ableWidth' of my device is 960, with the above formula the actual width in my Flash movie (usable screen pixels) is something like 1365. So if I want to place something edge to edge, I need to use that size instead.

Hope this helps.

Colin Holgate
Inspiring
July 30, 2014
Known Participant
July 30, 2014

Hi Colin, for some reason your responses are not showing up in the thread... they're just blank / no text. Just a heads up.