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.
Download the latest version of the Airflux Unity SDK package file.
Import the package file by selecting the menu option [Assets]>[Import Package]>[Custom Package].
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.
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.
Attention: Check country allowlist settings when updating SDK
When updating the Airflux SDK from version 0.1.0 to 0.2.0, the Country Allow All option is set to true by default. As a result, after the update, all countries regardless of your existing allowlist settings are allowed to follow Airflux's optimization policies.
If you wish to restrict countries by sticking to your existing allowlist settings, be sure to explicitly set Country Allow All to false after the update.
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
How can I set up the Airflux SDK to comply with the opt-in policy?
The opt-in policy requires user consent before collecting and using player data. To adhere to this policy, implement the following methods.
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.
Attention
Although event data is not tracked before StartTracking() is triggered and after StopTracking() is triggered, player attribute data is aggregated and anonymized for transmission upon calling the Inference API.
Initializing the Airflux SDK in inactive mode
Attention
If the SDK is not enabled immediately after the SDK initialization, the Install and Open events may not be collected.
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.
How can I configure the Airflux SDK to call the Inference API only in specific countries?
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.
Can I use other mediation platforms, such as MAX and AdMob, with Airflux?
Yes, Airflux is designed to work alongside existing mediation platforms.
Can I use Airflux without ADID collection?
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].
Troubleshooting
[Android] A coroutine dependency error occurs during the build process.
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 later.
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.
[Android] The "Manifest merger failed" error occurs during the build process.
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>tagadd
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>tagadd
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>tagadd
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>tagadd
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.
[Android] Conflict occurs when merging the Airflux SDK backup rules.
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
Create an Android Library project (
Assets/Plugins/Android/res.androidlib) to store your resource files.Add an
AndroidManifest.xmlfile in the created Android Library Project as follows.123456
Create a
res/xmlfolder inside the created Android Library Project.Create a file (e.g.,
custom_backup_rules.xml) within the new xml folder.Add the data backup rules defined by the Airflux SDK as follows.
12345678910111213141516
data_extraction_rules.xml setup
Create a file (e.g.,
custom_data_extraction_rules.xml) within the new xml folder.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

