Adobe Experience Cloud ANE for AdobeAIR mobile apps
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Pre-release version Please do not use in production.

The main ANE, ADBMobile.ane includes the latest Android release notes for Android and iOS release notes for iOS SDKs for Adobe Experience Cloud V4.17.0 being released on September 20, 2018

Make sure to study the ASDOC for this ANE to know how to work with it. We have tried to keep the method names similar to the Native methods.

The ANE depends on the OverrideAir ANE on both Android and iOS sides and you should be using at least AIR SDK 30 to compile your app. Below is the required manifest .xml settings:

<!-- Android -->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-sdk android:targetSdkVersion="26"/>

<!-- iOS -->
    Read this link and apply if required based on your apps required specifications:

<!-- Extensions -->

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