How to package Adobe AIR apps for Android that use the shared runtime

Since the release of the Adobe AIR 3.8 SDK, all Android apps are packaged as captive runtime, regardless of the packaging options you select in IDEs like Flash Builder.

To override this behaviour, simply add the following environment variable to your system settings:

AIR_ANDROID_SHARED_RUNTIME=true

Restart your IDE and the next time you package your Adobe AIR app for Android, you’ll be able to use the shared runtime as before!*

* Mixed results reported by users of Flash CC, works every time with pretty much everything else

How to opt-out of Adobe AIR app analytics on Android

If you ever publish an Android app using Adobe AIR, you’ll notice that the application ID is automatically prefixed “air.”, for example air.com.company.appname. This is to enable Adobe to track apps created using Adobe AIR in app stores like Google Play and Amazon Appstore.

If you want to opt-out of Adobe’s analytics, or just don’t want an “air.” prefix on your app ID, simply add the following environment variable to your system settings or build script:

AIR_NOANDROIDFLAIR=true

Restart your IDE and that’s it!

Unfortunately, opting-out of Adobe AIR app analytics on iOS is rather more complicated.

Make your full screen Android apps even fuller screen with the latest update to our Adobe AIR ANE

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.

UK Radio Streamer available for Windows Phone

We’re pleased to announce that UK Radio Streamer is now available in the Windows Phone Store for Windows Phone 7 & 8.

UK Radio Streamer is the quickest and easiest way to listen to more than 300 commercial radio stations from across the UK, including Absolute, Capital, Heart, Kiss and Magic to name but a few.

It’s free to download, and the latest Windows Phone 8 release adds favorites and the ability to upgrade to ad-free via a low cost in-app purchase.

Instant search enables you to find stations fast, displaying matching results as you type.

Stations play in the background, so you can continue to listen while browsing the web or using other apps, and the app integrates with your phone using your colour scheme and the ability to control playback using the regular Windows Phone volume and media controls.

Stations are streamed over the internet, so Wi-Fi or mobile data plan is required.

Got Windows Phone? Get UK Radio Streamer.

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.

How to target legacy versions of Adobe AIR runtime on Android using Flash Builder 4.7 (without using captive runtime)

The problem

Despite Adobe Flash falling out of favour for many web applications, Adobe AIR remains a great option for cross-platform mobile app development and rapid prototyping, and with the advent of captive runtime for Android it’s now possible to distribute apps without having to ask users to download and install the Adobe AIR runtime separately.

However, if you’re looking to distribute a simple experiment or throwaway game that’s just a few 10s of 100s of kilobytes on its own, wrapping it up with a near 10MB runtime isn’t quite as desirable.

So, you can just select “Export application that uses a shared AIR runtime”, right? Sadly not. If you’re targeting the original Kindle Fire (AIR 2.7), any of the Kindle Fire HD range (AIR 3.1), or the Nook HD or HD+ (AIR 3.3) you’ll find that they all come with embedded, non-updateable versions of the Adobe AIR runtime which are at least a few versions older than the AIR SDK used by Flash Builder 4.7 for ActionScript projects (this is how to update it, in case you wondered).

Assuming your app doesn’t use any of the features added in more recent versions of AIR, this is how you can target legacy runtimes using Flash Builder 4.7:

The solution

1. Edit the .actionScriptProperties file

While Flash Builder doesn’t have an option to change the compiler used for ActionScript or ActionScript Mobile Projects, you can switch your project from the new ASC2 compiler to the standard ActionScript Compiler (ASC) by editing your project’s .actionScriptProperties file:

  1. Use Explorer/Finder to navigate to your project folder and locate .actionScriptProperties
  2. Open the file in a text editor, and find/replace useFlashSDK=”true” with useFlashSDK=”false”
  3. Save .actionScriptProperties
  4. Close then open your project using the right-click menu options (or restart Flash Builder)

Now, if you open your project properties in Flash Builder (right click > Properties) and select ActionScript Compiler, you’ll see that you can select which version of the Flex SDK (which includes ASC), and therefore AIR SDK, you’d like to use to compile your project.

2. Add the required SDK(s)

If the SDK you need isn’t listed, Adobe has instructions for adding SDKs to Flash Builder here, and archived versions of both the Flex and AIR SDKs can be downloaded from:

3. Add -swf-version

Once you’ve edited .actionScriptProperties and installed your SDKs, the final step is to ensure that the your project uses the correct SWF version for the target AIR runtime.

To do this, open the ActionScript Compiler properties for your project and add -swf-version=XX on a new line in the “Additional compiler arguments:” text box, where XX is the appropriate number from this table.

4. That’s it!

Just debug and compile your project as before, and you’ll have a nice, tiny APK that works on even the most awkward of devices!

Using shared runtime with AIR SDK 3.7+

If you want to re-enable the ability to package Android apps without the captive runtime using AIR SDK 3.7+, set the AIR_ANDROID_SHARED_RUNTIME environment variable to true.

Device appears to be offline?

If you receive the an error saying “Device appears to be offline. Restarting the device may fix the problem.” while testing or debugging your app in Flash Builder, simply overwrite [legacy_sdk]\lib\android\bin with the same folder from the latest Adobe AIR SDK, or copy aapt.exe, adb.exe, AdbWinApi.dll, AdbWinUsbApi.dll and dx.jar (under lib rep) from [latest_android_sdk]\android-sdk\platform-tools into the folder, overwriting the files that are already in there.

 

UK Radio Streamer now available in Amazon Appstore

We’re pleased to announce that our popular, free UK Radio Streamer is now available via the Amazon Appstore.

This release offers the same great features and radio stations as before, but it’s inclusion in the Amazon Appstore means that it’s now available on the Kindle Fire range of tablets for the first time, including both the original Kindle Fire and the latest Kindle Fire HD.

Click here to download UK Radio Streamer from Amazon Appstore now!

UK Radio Streamer. 1 app. 300 UK radio stations.

 

Adding H264/MP4/Quicktime support to DivX Connected

Some time ago, Kamiwa wrote an excellent, if rather technical, blog post showing how to add support for a range of additional video formats to the DivX Connected set-top box, which was quickly followed by the All-In-One pack for implementing many of these changes.

So, picking up where he left off, we’ve added support for a range of additional MP4 video formats and resolved some audio sync issues.

Making the update

Before you start, you’ll need to exit the DivX Connected server application, then download and install all of the following software:

  1. DivX Connected Server 1.5.1
  2. DivX Plus Coded Pack
  3. ffdshow tryouts (32-bit)
  4. Matroska Splitter

Next, download the updated configuration files and extract the contents to a memorable location, e.g. your Desktop:

Once extracted:

  1. Double click both the ffdshow_audio.reg and ffdshow_video.reg files and press Yes/OK when prompted (these are the same as Kamiwa’s original All-In-One pack)
  2. Copy DCDShowPlaybackPlugin.config to the DivX Connected program folder
    • 32-bit Windows: C:\Program Files\DivX\DivX Connected\Bin\DivX Connected
    • 64-bit Windows: C:\Program Files (x86)\DivX\DivX Connected\Bin\DivX Connected
  3. Restart the DivX Connected server software
  4. Play your MP4s

That’s it!

Fast forward & rewind

If you find that you’re unable to fast forward or rewind non-DivX videos, don’t panic! Simply tap the up and down arrows on your remote control to skip forward/backward through the video, or use the number keys to jump to a virtual chapter.

Audio Sync

We’ve had reports of some users experiencing occasional audio sync issues during H.264 video playback (MP4 and MKV files).

If you find that these issues cannot be resolved by stopping and restarting the video, or skipping back to the start by pressing the 0 (zero) button, we’ve prepared an alternative configuration file that switches H.264 decoding from DivX Plus to ffdshow:

If you would prefer to make the changes manually, open DCDShowPlaybackPlugin.config and comment out (or remove) the <decoder> block immediately after “DivX H.264 Decoder : DivX supplied” and restart DivX Connected.

UK Radio Streamer available for iOS

We’re pleased to announce that our free UK Radio Streamer is now available for iOS via App Store!

The app runs on iPhone (3GS or newer), iPad and most iPod touch, and brings together nearly 300 commercial radio stations from across the UK, including Absolute, Capital, Heart, Kiss and Magic to name but a few.

Instant search enables you to find stations fast, displaying matching results as you type, and you can easily mark and view your favourite stations by tapping the star symbols.

Stations play in the background, so you can continue to listen while browsing the web or using other apps.

Stations are streamed over the internet, so a Wi-Fi or a mobile data connection, e.g. 3G, is required.

UK Radio Streamer now available for Android

UK Radio Streamer is now available for Android!

The Android release of UK Radio Streamer is a great way to listen to popular UK radio stations on the move, including Capital, Heart, Kiss and Magic to name but a few.

All stations are streamed over the internet, so don’t worry if you haven’t got an FM tuner in your phone.

If your favourite station isn’t listed, and it’s available online as an an MP3 or AAC/AAC+ stream, let us know by adding a comment to this post and we’ll see what we can do!

Unfortunately, we’re not able to guarantee that all stations will be available at all times. Required internet connection.

It’s completely free, so download it today from Google Play!

 

Make it Mesmotronic