Skip to content
Switch branches/tags
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

ADBMobile ANE for Adobe AIR apps

This ANE provides AIR developers access Adobe Mobile SDK for Android and iOS.

IMPORTANT: Implementing ANEs in your AIR projects means you may be required to add some dependencies or copy some frameworks or editing your app's manifest file. Our ANE setup instruction is designed in a human-readable format but you may still need to familiarize yourself with this format. Read this post for more information

If you think manually setting up ANEs in your projects is confusing or time-consuming, you better check the ANELAB Software.

The ANE-LAB Software

Tech Support

If you need our professional support to help you with implementing and using the ANE in your project, you can join MyFlashLabs Club or buy a premium support package. Otherwise, you may create new issues at this repository and the community might help you.

AIR Usage

After implemnting the ANE, it's time to see how the API should be initialized. ANE initialization must happen the soonest possible in your app. The best place for this is the Construction-function of the Document-class of your project.

  1. Add the config file, ADBMobileConfig.json to you app.
// config file should be in File.applicationStorageDirectory

// If you are bundling the config file in your app, it will be in File.applicationDirectory
var f:File = File.applicationDirectory.resolvePath("ADBMobileConfig.json");

// You should copy it to File.applicationStorageDirectory
var dis:File = File.applicationStorageDirectory.resolvePath("ADBMobileConfig.json");


// call init and pass the config File to it.
  1. Managing the Analytics App LifeCycle. On Android, you must notify the ANE when app starts or goes to background each time, on the iOS side however, this is managed automatically by the SDK.
    Right after the ANE is initialized, call "collectLifecycleData"

    iOS will send lifecycle information with or without calling "collectLifecycleData"; and
    this method is only a way to initiate lifecycle earlier in the application's launch sequence.

On Android, listen for Event.ACTIVATE and Event.DEACTIVATE and when app goes to background or when it closes, call pauseCollectingLifecycleData()

NativeApplication.nativeApplication.addEventListener(Event.ACTIVATE, handleActivate);
NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, handleDeactivate);

private static function handleActivate(e:Event):void
    if(OverrideAir.os == OverrideAir.ANDROID)
            // this happens on iOS automatically. so we should call this on Android

private static function handleDeactivate(e:Event):void
    if(OverrideAir.os == OverrideAir.ANDROID)
        // this happens on iOS automatically. so we should pause only on Android
  1. Different methods of the ANE, are expecting an optional ContextData object. You can use it to pass any context data you like based on your apps requirements. below is a sample on how to create a ContextData instance and pass it to the collectLifecycleData method.
var ctx:ContextData = new ContextData();
ctx.put("myapp.category", "Game");
// ctx.put("key", "value");
// ctx.put("key3", "value3");
  1. Accessing the analytics methods and other APIs are through static getters of ADBMobile class:
  1. For Video Analytics, you need to pass in the events to the ANE using the API.
var mediaSettings:MediaSettings = new MediaSettings(false); = "name";
mediaSettings.lng = 10;
mediaSettings.playerName = "playerName";
mediaSettings.playerID = "playerId";
// for other settings check asdoc;

// check asdoc to know other methods like

Are you using this ANE in your project? Maybe you'd like to buy us a beer 🍺?


Add your name to the below list? Donate anything more than $100 and it will be.

Sponsored by...
We produce interactive content for the best in children's media


Adobe Experience Cloud ANE for AdobeAIR mobile apps




No releases published


No packages published