LogoLogo
My AppsLive demoNewsArticles
  • Introduction
  • 📌Product updates: 2025
    • 2024
    • 2023
  • Getting Started
    • Registration
    • Adding a space
    • Adding an app to the space
  • Basic Events & Custom Events
  • Integration
    • Expert Tips
      • What to track
      • Payments & Anti-cheat
      • Check your integration
    • Integration of SDK 2.0+
      • SDK Integration
        • Android
        • iOS
        • macOS
        • Windows
        • Web
          • Web SDK Integration
          • Web SDK Releases
        • Unity
        • Unreal Engine
        • Godot Engine
      • Automatic payment tracking
        • App Store
        • Google Play
      • Setting up Events
        • Basic methods
        • Secondary methods
        • User profile
        • Anticheat methods
        • Track sessions
      • Push notifications
        • Android
        • iOS
        • Windows (UWP)
        • Unity
          • Android
          • iOS
          • Windows (UWP/WSA)
        • Unreal Engine
      • A/B testing
        • Description of A/B testing on the SDK side
        • Working with A/B tests in the devtodev interface
        • A/B testing examples
    • Integration of SDK 1.0+ (deprecated)
      • SDK Integration
        • iOS
        • Android
        • Windows 8.1 and 10
        • Web
        • Unity
        • Mac OS
        • Adobe Air
        • UE4
      • Setting up Events
        • Basic methods
        • Secondary methods
        • User profile
        • Anti-cheat Methods
      • Push Notifications
        • IOS
        • Android
        • Windows 8.1 and Windows 10
        • Unity
        • Abode Air
        • UE4
    • Test Devices
    • Server API
      • Data API 2.0
      • Subscription API
      • Push API
        • IOS
        • Android
        • Windows UWP
        • Windows
      • Raw Export
      • Labels API
      • Data API
    • Import historical data via API
    • Data Export
      • Data Export to Cloud Storage (BigQuery / Amazon S3)
  • 3rd Party Sources
    • Attribution Trackers
      • AppsFlyer
      • Adjust
      • Branch.io
      • Kochava
      • Tenjin
      • Tune (MAT)
      • Singular
      • Custom postback API
      • Facebook Ads referral decryption
    • App Marketplace Data
      • App Store Connect Stats
      • App Store Subscriptions
      • Google Play Console Stats
      • Google Play Subscriptions
      • AppGallery Connect Stats
    • Ad revenue
      • AdColony
      • AdMob
      • Facebook
      • MoPub
      • Unity Ads
      • Vungle
      • Ad revenue API
    • Cohort export
  • Reports and Functionality
    • Space-related Reports and Functionality
      • Overview
      • Custom dashboards & Reports
      • SQL
        • SQL tips
        • SQL Query examples
      • Audience overlap
    • Project-related Reports and Functionality
      • Overview
        • Real-Time Dashboard
        • Acquisition reports
        • Engagement reports
        • Monetization reports
        • In-game analysis reports
        • Cohort analysis
      • Reports
      • Push Notifications
        • Android Notifications
        • IOS Notifications
        • Windows Notifications
        • Button Templates
      • Predictions
      • Users & Segments
      • Filters
      • A/B Testing
      • Tuning
      • Settings
  • Metrics and Glossary
    • Ad networks metrics
    • Market Metrics
    • Prediction Metrics
    • SDK Metrics
    • Subscription metrics
  • Space Management
  • User Profile Management
  • Limits
  • Scenarios and Best Practices
    • Analytics use cases
    • Match-3
    • MMORPG Games
    • Hyper-Casual games
    • Social Casino
    • RPG games
    • Farming games
    • Non-gaming app
    • Acquisition Example
  • FAQ
    • Identification
    • Raw Data
    • All about data discrepancies
  • Slack
Powered by GitBook
On this page
  • Additional initialization
  • Debug mode

Was this helpful?

Export as PDF
  1. Integration
  2. Integration of SDK 1.0+ (deprecated)
  3. SDK Integration

Adobe Air

PreviousMac OSNextUE4

Last updated 17 days ago

Was this helpful?

This generation of SDK is deprecated and is no longer supported.

Please do the following to integrate your application with devtodev:

  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. Add com.devtodev.sdk.ane library to your application

  3. For Android add the following permissions to the 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

  <receiver android:name="com.devtodev.InstallReceiver" android:enabled="true" android:exported="true">
  <intent-filter>
       <action android:name="com.android.vending.INSTALL_REFERRER" />
  </intent-filter>
  </receiver>

For other platforms no changes are needed.

5. Add the following imports to your source

  import com.devtodev.sdk.core.DevToDev;
  import com.devtodev.sdk.core.data.consts.AccrualType;
  import com.devtodev.sdk.core.data.consts.Gender;
  import com.devtodev.sdk.core.data.consts.SocialNetwork;
  import com.devtodev.sdk.core.data.consts.TutorialState;
  import com.devtodev.sdk.cheat.data.consts.VerifyStatus;
  import com.devtodev.sdk.cheat.data.consts.TimeStatus;
  import com.devtodev.sdk.core.data.metrics.aggregated.events.CustomEventParams;

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 ("Settings" → "SDK" → "Integration").

For example: file MyApplication.mxml:

<?xml version="1.0" encoding="utf-8"?>
<s:Application initialize="application1_activateHandler(event)" 
               deactivate="application1_deactivateHandler(event)" 
               xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark" applicationDPI="160">
    <fx:Script>
        <![CDATA[
                 import com.devtodev.sdk.core.DevToDev;
                 import com.devtodev.sdk.core.data.consts.AccrualType;
                 import com.devtodev.sdk.core.data.consts.Gender;
                 import com.devtodev.sdk.core.data.consts.SocialNetwork;
                 import com.devtodev.sdk.core.data.consts.TutorialState;
                 import com.devtodev.sdk.cheat.data.consts.VerifyStatus;
                 import com.devtodev.sdk.cheat.data.consts.TimeStatus;
                 import com.devtodev.sdk.core.data.metrics.aggregated.events.CustomEventParams;

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

                 protected function application1_deactivateHandler(event:Event):void {
                      DevToDev.endSession();        
                 }
        ]]>
    </fx:Script>

    <fx:Declarations>
    </fx:Declarations>

    <s:VGroup>
    </s:VGroup>

</s:Application>

file MyApplication.xml:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/17.0">
   <id>com.my.application</id>
   <filename>myapplication</filename>
   <name>myapplication</name>
   <versionNumber>1.0.0</versionNumber>
   <initialWindow>
      <autoOrients>true</autoOrients>
      <fullScreen>false</fullScreen>
      <visible>true</visible>
      <softKeyboardBehavior>none</softKeyboardBehavior>
   </initialWindow>
   <android>
      <colorDepth>16bit</colorDepth>
      <manifestAdditions><![CDATA[
         <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"/>
            <application>
                 <receiver android:name="com.devtodev.InstallReceiver" android:enabled="true"
                 android:exported="true">
                   <intent-filter>
                        <action android:name="com.android.vending.INSTALL_REFERRER" />
                   </intent-filter>
                 </receiver>
            </application>
         </manifest>
      ]]></manifestAdditions>
   </android>
   <iPhone>
      <InfoAdditions><![CDATA[
         <key>UIDeviceFamily</key>
         <array>
            <string>1</string>
            <string>2</string>
         </array>
      ]]></InfoAdditions>
      <requestedDisplayResolution>high</requestedDisplayResolution>
   </iPhone>

   <extensions>
      <extensionID>com.devtodev.SDK</extensionID>
   </extensions>
</application>

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 a 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 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 is supposed 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 the user. This identifier will be 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)
*/
DevToDev.setUserId(activeUserId:String);

/**
* 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.setCurrentLevel(level:int);

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

If your application allows user to re-login (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)
*/
DevToDev.setLogLevel(logLevel:int);
Download the latest version of devtodev SDK from the GitHub repository.