Highlighted

AIR for Android maximum screen size?

New Here ,
Jul 28, 2014

Copy link to clipboard

Copied

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.

TOPICS
Development

Views

1.3K

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 for Android maximum screen size?

New Here ,
Jul 28, 2014

Copy link to clipboard

Copied

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.

TOPICS
Development

Views

1.3K

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
Jul 28, 2014 0
Community Beginner ,
Jul 29, 2014

Copy link to clipboard

Copied

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.

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...
Jul 29, 2014 0
Adobe Community Professional ,
Jul 30, 2014

Copy link to clipboard

Copied

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...
Jul 30, 2014 0
Community Beginner ,
Jul 30, 2014

Copy link to clipboard

Copied

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

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...
Jul 30, 2014 0
Adobe Community Professional ,
Jul 30, 2014

Copy link to clipboard

Copied

Thanks for letting me know! Here's the main thing I said:

What you say about fullscreen isn’t correct. That just dictates whether the status bar is showing or not.

The thing that controls how the stage is scaled is stage.scaleMode. The default value is “showAll”, and under that the stage will scale up so that either the height of the stage fills the height of the dvcid, or the width fills the width, depending on the ratio of the stage and the device.

“noBorder” is another useful mode. You could design a 14:9 stage and have content near the edges that isn’t vital. The stage would then scale to fill the screen, but would allow some content to go off the edges. It’s easy to support a range of devices, from 4:3 to 16:9, with that single 14:9 stage.

Some people use “noScale”, and then do all the mathematics themselves to get the contents of the stage to scale correctly. I just let Flash do that for me!

What moonlight says about calculating the pixels that are visible on a given device is true, and useful. Here’s my function for finding out where the top of the stage falls on the current device:

private static var landscapewidth:int = Math.max(Capabilities.screenResolutionX,Capabilities.screenResolutionY);

private static var landscapeheight:int = Math.min(Capabilities.screenResolutionX,Capabilities.screenResolutionY);

public static function landscapeTopEdge(thestage:Stage){

  return thestage.stageHeight * .5 - (thestage.stageWidth / landscapewidth * landscapeheight) * .5;

}

Because I pass in the stage to the function I can use its width and height as part of the calculation. That saves hard coding it for a particular stage size.

It’s a static function because I have it in a class with other device utilities. I would call it like this:

var topedge: Number = DeviceUtils.landscapeTopEdge(this.stage);

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...
Jul 30, 2014 1
New Here ,
Jul 30, 2014

Copy link to clipboard

Copied

Thank you very much, moonlightinteractive

Sorry for not being clear enough, but this 720p which my app shrinks to is what I called 'AIR maximum screen size' in my case. I use a very similar code to put my app in fullscreen. If I don't use it, my app goes out of screen as well, since it's made for 1080p. Capabilities.screenResolutionY shows 720p for my device, even though it's set to 1080p through Android Configs (my TV confirms this 1080p). That's why I thought AIR might have a maximum resolution.

Anyway, from what you said, you've already made AIR apps for resolutions bigger than 720p, which shows me that my (weird) device is the problem. Just for peace of mind, what Android version do you use in your Nexus 10? Mine is 4.2.

Best regards

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...
Jul 30, 2014 0
Adobe Community Professional ,
Jul 30, 2014

Copy link to clipboard

Copied

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...
Jul 30, 2014 0
Community Beginner ,
Jul 30, 2014

Copy link to clipboard

Copied

Hi jonespeople, I'm running 4.4.2 on the Nexus... I have a Galaxy S3 at 4.1.2, and an LG optimus at 2.3.4 and both of those work with the larger development size as well. I don't know which platform you're developing in (I'm in Flash CS6/CC2014) but I know for iOS publishing in Flash CS6, there's a pulldown for resolution that is "standard" and "high." On occasion, I've published to the standard one accidentally and it takes my app and publishes it at low resolution (akin to a 720 type). There is no setting for resolution for Android in Flash CS6, but maybe there's some setting in your program or in the xml that is causing it? Just a thought. 

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...
Jul 30, 2014 0
Community Beginner ,
Jul 30, 2014

Copy link to clipboard

Copied

Just a quick follow up on the XML possibility, I have this set in mine:

<requestedDisplayResolution>high</requestedDisplayResolution>

Maybe that would help.

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...
Jul 30, 2014 0
Adobe Community Professional ,
Jul 30, 2014

Copy link to clipboard

Copied

We test on all sorts of devices. The highest resolution device we use is the Kindle Fire HDX, at 2560x1600.

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...
Jul 30, 2014 0
New Here ,
Jul 30, 2014

Copy link to clipboard

Copied

Thanks guys

No success here, moonlightinteractive. I've put the <requestedDisplayResolution>high</requestedDisplayResolution> inside <initialWindow>. When I tried to run, it said that this tag couldn't be used for Android. And after reading Adobe docs, it seems that this tag only works for iOS deployments.

I'm creating from Flash CC and FlashDevelop. Same result for both: 720p fullscreen.

Here's my xml:

===============================================

<?xml version="1.0" encoding="utf-8" standalone="no" ?>

<application xmlns="http://ns.adobe.com/air/application/14.0">

  <id>fullscreentest</id>

  <versionNumber>1.0.0</versionNumber>

  <versionLabel/>

  <filename>fullscreentest</filename>

  <description/>

  <name>fullscreentest</name>

  <copyright/>

  <initialWindow>

    <content>fullscreentest.swf</content>

    <systemChrome>standard</systemChrome>

    <transparent>false</transparent>

    <visible>true</visible>

    <fullScreen>true</fullScreen>

    <aspectRatio>portrait</aspectRatio>

    <renderMode>cpu</renderMode>

    <autoOrients>false</autoOrients></initialWindow>

  <icon/>

  <customUpdateUI>false</customUpdateUI>

  <allowBrowserInvocation>false</allowBrowserInvocation>

  <android>

    <manifestAdditions><![CDATA[<manifest>

<uses-permission android:name="android.permission.INTERNET"/>

</manifest>]]></manifestAdditions>

  </android>

</application>

===============================================

My .fla is set to 1920 x 1080 stage size.

A simple trace(Capabilities.screenResolutionX + " " + Capabilities.screenResolutionY) produces the output "1280 720" when debugged in my Android device connected through HDMI to a fullHD TV. And this device is supposedly 1080p (set manually in Settings > Screen)

Since you guys can use resolutions bigger than 720p, AIR is not the problem. My conclusion is that my device is crap. Beware of these Android TV boxes from China!

Thanks for your help

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...
Jul 30, 2014 0