2. Install the Airflux SDK

By installing the Airflux SDK in your app, you can collect in-game data required for Airflux's model training. The installation and setup will take approximately 5 minutes.


1. Import the Airflux package

Follow the steps below to add the Airbridge SDK package file to your project.

  1. Download the latest version of the Airflux Unity SDK package filearrow-up-right.

  2. Import the package file by selecting the menu option [Assets]>[Import Package]>[Custom Package].

  3. When the import is complete, the [Airflux] tab will appear in the top menu bar of the Unity Editor.

2. Set up SDK initialization

The SDK initializes automatically every time your app is opened.

circle-info

Opt-in policy compliance

If player consent is required to send in-game data, implement the necessary setup by following the FAQ section below.

How can I set up the Airflux SDK to comply with the opt-in policy?

Select [Airflux]>[Airflux Settings] from the top menu bar in the Unity Editor and configure the keys as listed below.

triangle-exclamation
Key
Required / Optional
Data Type
Default
Description

App Name

Required

string

-

Input the App Name from the Airbridge dashboard.

App Token

Required

string

-

Input the SDK Token from the Airbridge dashboard.

Log Level

Optional

string

warning

Set the log level for the Airflux SDK. Choose from debug, info, warning, error, fault .

Session Timeout Seconds

Optional

double

300

The default value is 300 seconds. Modify if needed.

Country Allow All

Required

boolean

true

When set to true, all countries are allowed to follow Airflux's optimization policies.

Country Allowlist

Required

array

[ ]

Set the countries where calling the Airflux's inference API should be allowed. Use country codes following the ISO 3166-1 alpha-2 format (e.g., US, KR). You can set multiple countries using the Country Allowlist array.

Auto Start Tracking Enabled

Optional

boolean

false

Set whether to collect events automatically upon SDK initialization. - true: Event collection starts automatically upon initialization. - false: Event collection starts upon calling the Airflux.StartTracking() function.

SDK Enabled

Optional

boolean

false

Set whether to enable the SDK upon initialization. - true: The SDK is initialized in active mode. - false: The SDK is initialized in inactive mode and is enabled upon calling theAirflux.EnableSDK()function.

Frequently Asked Questions

chevron-rightHow can I set up the Airflux SDK to comply with the opt-in policy?hashtag

The opt-in policy requires user consent before collecting and using player data. To adhere to this policy, implement the following methods.

  1. SDK opt-in setup

Upon initialization of the Airflux SDK, set Auto Start Tracking Enabled to false and call the StartTracking() function at the point where you received user consent for data tracking. The Airflux SDK will collect data after the StartTracking() function is called.

triangle-exclamation

  1. Initializing the Airflux SDK in inactive mode

triangle-exclamation

Set SDK Enabled to false to initialize the SDK with all functions disabled until user consent for data tracking is obtained. Through this method, you can adhere to privacy policies to the highest level. Note that when the SDK is set in inactive mode, all features are disabled and no events and player attribute data is sent to Airflux.

chevron-rightHow can I configure the Airflux SDK to call the Inference API only in specific countries?hashtag

Set the "Country Allow All" to false and add the countries you want to allow to the "Country Allowlist". Country codes should follow the ISO 3166-1 alpha-2 format (e.g., "US", "KR"), and multiple countries can be specified by separating codes with commas.

chevron-rightCan I use other mediation platforms, such as MAX and AdMob, with Airflux? hashtag

Yes, Airflux is designed to work alongside existing mediation platforms.

chevron-rightIs IL2CPP supported? hashtag

Yes, Airflux supports IL2CPP.

chevron-rightCan I use Airflux without ADID collection? hashtag

Currently, Airflux cannot be used in environments where ADID collection is not allowed. For further discussion or support regarding the use of Airflux in environments with ADID collection restrictions, such as children's apps, contact us at [email protected]envelope.

Troubleshooting

chevron-right[Android] A coroutine dependency error occurs during the build process. hashtag

Issue

A coroutine dependency error occurs during the build process with the following message.

Cause

If the kotlinx-coroutines-core library version is 1.3.5 or later, the kotlin-stdlib library version must be at a certain level or laterarrow-up-right.

Solution

Check whether the kotlin-stdlib library version is v.1.3.70 or later with the gradlew dependencies command. If the version is earlier than v.1.3.70, you need to update it.

chevron-right[Android] The "Manifest merger failed" error occurs during the build process.hashtag

Issue

The "Manifest merger failed" error occurs during the build process.

Cause

The Airbridge SDK's AndroidManifest.xml includes rules to opt out of backing up the Shared Preferences data. The purpose of this rule is to avoid retaining the same Airbridge settings during the reinstallation of the app so that new installs or reinstalls can be detected accurately.

Merging Airbridge SDK backup rules with your app backup rules can cause conflicts.

Solution

Below are the opt-out rules defined in the Airbridge SDK.

Backup on Android 12 or laterBackup on Android 11 and earlier.

Fix conflict with fullBackupContent="string"

Adding android:fullBackupContent="string" to the AndroidManifest.xml file may cause an error like the following.

Build Output

To fix this error,

  • add xmlns:tools="http://schemas.android.com/tools" to the <manifest> tag

  • add tools:replace="android:fullBackupContent" to the <application> tag

in the Custom Main Manifest(Assets/Plugins/Android/AndroidManifest.xml) file.

Fix conflict with dataExtractionRules="string resource"

Adding android:dataExtractionRules="string resource" to the AndroidManifest.xml file may cause an error like the following.

Build Output

To fix this error,

  • add xmlns:tools="http://schemas.android.com/tools" to the <manifest> tag

  • add tools:replace="android:dataExtractionRules" to the <application> tag

in the Custom Main Manifest(Assets/Plugins/Android/AndroidManifest.xml) file.

Fix conflict with allowBackup="false"

Adding android:allowBackup="false" to the AndroidManifest.xml file may cause an error like the following.

Build Output

To fix this error,

  • add xmlns:tools="http://schemas.android.com/tools" to the <manifest> tag

  • add tools:replace="android:allowBackup" to the <application> tag

in the Custom Main Manifest(Assets/Plugins/Android/AndroidManifest.xml) file.

If compileSdkVersion is lower than 31

The android:dataExtractionRules has been added in API Level 31. Therefore, if the compileSdkVersion is lower than 31, an error like the following may occur.

Build Output

To fix this error,

  • add xmlns:tools="http://schemas.android.com/tools" to the <manifest> tag

  • add tools:remove="android:dataExtractionRules" to the <application> tag

in the Custom Main Manifest(Assets/Plugins/Android/AndroidManifest.xml) file.

For more guidance, refer to the articles below.

chevron-right[Android] Conflict occurs when merging the Airflux SDK backup rules.hashtag

Issue

If an Airflux SDK backup rule and a backup rule for a different third-party SDK (e.g., AppsFlyer SDK) overlap, you will see the build error below.

Cause

Overlapping of the Airflux SDK backup rules and third-party SDK backup rules can cause build errors.

Solution

backup_rules.xml setup

  1. Create an Android Library project (Assets/Plugins/Android/res.androidlib) to store your resource files.

  2. Add an AndroidManifest.xml file in the created Android Library Project as follows.

    123456

  3. Create a res/xml folder inside the created Android Library Project.

  4. Create a file (e.g., custom_backup_rules.xml) within the new xml folder.

  5. Add the data backup rules defined by the Airflux SDK as follows.

    12345678910111213141516

data_extraction_rules.xml setup

  1. Create a file (e.g., custom_data_extraction_rules.xml) within the new xml folder.

  2. Add the data backup rules defined by the Airflux SDK as follows.

AndroidManifest.xml setup

Apply the data backup rules to the Android App Manifest file (Assets/Plugins/Android/AndroidManifest.xml) as follows.

For more guidance, refer to the articles below.

Last updated