Requirements
- Android 5.0 (API level 21) or higher
- Android Studio Flamingo (2022.2.1) or newer
- Gradle 8.0+
Installation
Gradle (build.gradle)
Add the Linkrunner SDK to your app’sbuild.gradle file:
settings.gradle file:
Required Permissions
Add the following permissions to yourAndroidManifest.xml file:
Note: TheAD_IDpermission (<uses-permission android:name="com.google.android.gms.permission.AD_ID" />) is already included in the SDK and is required for collecting device identifiers (GAID). If your app participates in Designed for Families, you should revoke AAID and disable AAID collection. See the Disabling AAID Collection section in the usage guide for more details.
Revoking the AD_ID Permission
According to Google’s Policy, apps that target children must not transmit the Advertising ID. To revoke the AD_ID permission, use SDK version 3.5.0 and above. Children apps targeting Android 13 (API 33) and above must prevent the permission from getting merged into their app by adding a revoke declaration to their Manifest. Use thesetDisableAaidCollection() and isAaidCollectionDisabled() functions to disable AAID collection programmatically:
AndroidManifest.xml
Make sure to add
xmlns:tools="http://schemas.android.com/tools" to your manifest tag to use the tools:node="remove" attribute. If you disable AAID collection, you should also remove the AD_ID permission from your manifest to fully comply with Google Play’s Family Policy requirements.Backup Configuration
The SDK provides backup rules to exclude Shared Preferences data from backup. This prevents the retention of the Linkrunner install ID during reinstallation, ensuring accurate detection of new installs and re-installs.This backup configuration works similarly for all SDKs (React Native, Flutter, and native Android). The same Android backup rules apply regardless of which SDK you’re using.
Adding Backup Rules to Your App
Add to yourAndroidManifest.xml:
android:fullBackupContent- Used for Android 6-11android:dataExtractionRules- Used for Android 12+
Merging Backup Rules
If you already have your own backup rules specified (e.g.,android:fullBackupContent="@xml/my_backup_descriptor" or android:dataExtractionRules="@xml/my_rules"), then manually add the following rules to your existing files:
For legacy backup (Android 6-11) in res/xml/my_backup_descriptor:
res/xml/my_backup_rules.xml: