Adobe Air devtodev SDK. Analytics Integration

To integrate your application with devtodev system please perform the following actions:

  1. Add the application to the Space using the wizard for adding application. Attention! If your Adobe Air can be used for compilations for different platforms, you need to add the applications in devtodev for each platform. As a result, the statistics will be gained for each platform separately.
  2. Download the latest version of devtodev SDK from the GitHub repository.
  3. Add com.devtodev.sdk.ane library to your application

  4. For Android add the following permissions to the <android><manifestAdditions> in MyApplication.xml file:

    <uses-permission android:name="android.permission.INTERNET"/>
    <!-- Necessary(Required for sending analytics data to our server) -->
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <!-- Additional (Required for devices' MAC addresses collection) -->
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <!-- Additional (Required for cellular operator data collection) -->

    To automatically gather the referrals data on Android, add the following strings into tag<application></application>

    <receiver android:name="com.devtodev.InstallReceiver" android:enabled="true" android:exported="true">
         <action android:name="" />

    For other platforms no changes are needed.

  5. Add the following imports to your source

    import com.devtodev.sdk.core.DevToDev;


  6. Add following source into initialize event in MyApplication.mxml file:

    DevToDev.init(AppId:String, SecretKey:String);

    The appKey and appSecret values are unique for each app on each platform and can be found in the settings of appropriate app  (My apps -> App Name -> Settings -> Integration).

For example:
file MyApplication.mxml:

<?xml version="1.0" encoding="utf-8"?>
<s:Application initialize="application1_activateHandler(event)" 
               xmlns:s="library://" applicationDPI="160">
                 import com.devtodev.sdk.core.DevToDev;

                 protected function application1_activateHandler(event:Event):void {
                      DevToDev.init(AppId, SecretKey);

                 protected function application1_deactivateHandler(event:Event):void {




file MyApplication.xml:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="">
         <manifest android:installLocation="auto">
            <uses-permission android:name="android.permission.INTERNET"/>
            <uses-permission android:name="android.permission.WAKE_LOCK"/>
            <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
                 <receiver android:name="com.devtodev.InstallReceiver" android:enabled="true"
                        <action android:name="" />


Additional initialization

If the application you integrate SDK in is a part of cross-platform project, then the user data initialization is required.

Since the analytics of cross-platform projects is based on an unique user (unlike the usual projects where it is based on device identifiers), you have to:

  • Set the unique cross-platform user identifier (it will be used for cross-platform project data collection).
  • Actualize the user data. Mostly it is about game applications where the player has a game level as a characteristic. For such projects you need to set the current player level.

We recommend you to set the user identifier before SDK initialization, otherwise the user identifier from the previous session will be used since the SDK initialization moment till the setUserId method call.

If your cross-platform application supposes to be used without cross-platform authorization, don't use the setUserId method or use the empty string ("") as the user identifier. SDK will assign the unique identifier to user. This identifier will we used until the real cross-platform identifier assigns to the user.

* Method allows to initialize the user. It applies when SDK initialization or user relogin.
* @param activeUserId - unique cross-platform user identifier (max. 64 symbols)

* Method sets the current user level. Using this method allows to actualize the SDK user data
* in game cross-platform applications.
* @param level - number of current game level of the user

* devtodev App Id and Secret key can be found in the devtodev application
* settings page (“My apps” → App Name → “Settings” → “Integration”)
* @param appKey - application key
* @param appSecret - application secret
DevToDev.init(appKey:String, appSecret:String);

Attention! If your application allows user to relogin (changing the user during the working session of application), then the setUserID and setCurrentLevel methods should be called just after the authorization. You don't need to call the SDK initialization one more time.

Debug mode

To enable the debug mode and make SDK notifications displayed in the console use this method:

* @param logLevel (set logLevel=1 to enable log, 0 to disable)
Checking the events
Basic Methods