Enable true full screen in your Android apps with our new ANE for Adobe AIR

One of the most common complaints you hear from Adobe AIR developers is that they can’t get true full screen on Android devices that have an on-screen navigation bar (the one that contains the back, home and task buttons), with full screen usually meaning that the buttons are simply replaced with a series of grey dots.

If you’re one of those developers, then this AIR Native Extension (ANE) may be the solution you’ve been looking for.

This ANE requires Adobe AIR 4+.

How does it work?

This ANE enables developers to offer the same true full screen experience you see in apps like YouTube in their own Adobe AIR apps, expanding the app right to the edges of the screen, hiding the status and navigation bars until the user next interacts with the screen.

This is ideally suited to video or cut-scene content.

Code example

Using the ANE in your app couldn’t be easier:

import com.mesmotronic.ane.AndroidFullScreen;

AndroidFullScreen.hideSystemUI();

If you want to include the ANE in a cross-platform app, you have two options for implementation:

if (!AndroidFullScreen.hideSystemUI())
{
    stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
}

or

if (AndroidFullScreen.isSupported)
{
    AndroidFullScreen.hideSystemUI();
}
else
{
    stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
}

Starling

To use this ANE with Starling,  add Starling.handleLostContext = true; at the start of your ActionScript code to prevent Stage3D lost context errors breaking your app when switching between the normal app state and true full screen.

What’s next?

In the future, we’ll probably add more of Android’s ImmersiveMode features, like enabling your app to appear behind the user’s status and/or navigation bar.

Download

Click here to download the latest release from GitHub

Open source

This source code for this project has been made available on GitHub, under the BSD license.