The first release of our true full screen ANE (http://wp.me/pKrhE-8B) brought non-interactive true full screen to Adobe AIR apps for Android. Now, we’ve taken things one step further and enabled true, interactive full screen on Android 4.4+ using immersive mode.
Required Adobe AIR 4+.
How does it work?
This ANE enables developers to offer users a true full screen experience in the Adobe AIR apps for Android.
Using Android 4.0+, you can use true full screen in “lean mode”, the way you see in apps like YouTube, expanding the app right to the edges of the screen, hiding the status and navigation bars until the user next interacts. This is ideally suited to video or cut-scene content.
In Android 4.4+, however, you can now enter true full screen, fully interactive immersive mode. In this mode, your app will remain in true full screen until you choose otherwise; users can swipe down from the top of the screen to temporarily display the system UI.
Code example
Using the ANE in your app couldn’t be easier:
import com.mesmotronic.ane.AndroidFullScreen; AndroidFullScreen.hideSystemUI(); AndroidFullScreen.showSystemUI(); AndroidFullScreen.showUnderSystemUI(); AndroidFullScreen.immersiveMode(); // * AndroidFullScreen.immersiveMode(false); // * // * = Android 4.4+ only
Most of the new methods are self explanatory, with the new immersiveMode() method used to enter interactive true full screen mode permanently using so-called “sticky” mode and immersiveMode(false) entering true full screen until the user swipes down from the top to show the system UI.
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.
Make your full screen #Android apps even fuller screen with the latest update to our Adobe #AIR #ANE http://t.co/dSZShEGUsg
thanks,very useful!
Hi, thanks for this extension!! i’ve a question…i can’t download the compiled ANE file from GitHub and i’m not able to compile it from the build.cmd in which i can see this command : “call adt -package -target ane ./AndroidFullScreen.ane extension.xml -swc ../fullscreen-ane-android/bin/fullscreen-ane-android.swc -platform Android-ARM -C android . -platform default -C default .”
can you show me a solution? :)
thanks in advance
I’m getting the error:
[AIR Debug Launcher]: Error: The extension com.mesmotronic.ane.fullscreen has either a namespace version or library.swf with a version that is incompatible with the applications namespace or root SWF.
For the air sdk 13.0.0.83 when trying to launch a test-as3 project in emulator.
Sorry to hear you’re having problems downloading the ANE. It sounds like you can download the source without any problems, so I’ll see if I can get someone to add the ANE binary to the repo to make it more accessible.
We’ve only seen that type of error with AIR SDK <4.0. I'll ask someone to take a look and let you know if we come up with anything.
Hi! Great extensions! But when used this with Starling, when minimize app his preview in recent app is black (like Chrome on this picture http://www.androidguys.com/wp-content/uploads/2012/12/recent-apps1.png). Starling.handleLostContext set to “true”.
How fix this?
Hi loover, glad you like the ANE.
In our experience, this is a common issue with AIR apps that use StageVideo or Stage3D, rather than an ANE issue. If you find a solution, please don’t hesitate to share it with us!
Thanks for answer. But app miniature without this extensions look fine.
Maybe, need complete restore default UI before minimize app?
I always get this error: “ReferenceError: Error #1065: Variable com.mesmotronic.ane::AndroidFullScreen is not defined.”
What can I do?
Hi vamapaull: it sounds like you just need to ensure that the ANE is included in your build packaging.
In Flash Builder, for example, this is done by opening project properties > Flash/Flex Build Packaging > Google Android > Native Extensions (tab) > select Package tick box (centre-right).
Hello, thanks for the great extension!
The problem that I’m having right now is that the extension doesn’t seem to be supported on my device (a Nexus 5 running Android 5.1.1). Here are some of the things I’ve noticed:
-calling hideSystemUI() doesn’t hide the UI and returns a value of false
-the system UI is still there after calling immersiveMode(); also, the function returns a value of false
-isSupported and isImmersiveModeSupported are both false
In my code, Starling.handleLostContext is set to true, and stage.displayState is set to StageDisplayState.FULL_SCREEN_INTERACTIVE. In the app XML, I have false. I have also confirmed that I am using AIR 17. Unfortunately, these changes have had no effect on the problem.
Any ideas as to what’s going on? Your help is appreciated.
Glad you like our ANE! We’ve tested it on an identical device here without any problems. From your description, it sounds like the updated ANE has not been included in your build packaging, which which would result in the symptoms you describe.
Thanks very much for the extension, it’s working perfectly on the
Android devices I’ve tested it on.
This is probably a stupid question, but how do I get my app using it to run on iOS devices / the iOS Air simulator? (And just sit there an do nothing obviously) At the moment it fails to run with a packaging error.
Is it a configuration mistake on my part, or will I need to write a dummy / empty iOS branch for the ANE?
Thanks again, Mark
There’s already a “default” dummy/placeholder that runs on non-Android devices, you just need to make sure that the ANE is included in your packaging options and you should find that it works, but everything just returns `false`.
Many thanks Mesmotronic, I can now build happily for iOS.
Despite there being a big red cross next to it, when I included the ANE via Project Properties \ ActionScript Build Packaging \ Apple iOS \ Native Extensions, and then checked ‘Package’ (In Flash Builder 4.7) it was then fine.