You can use the Adjust SDK to record activity from apps that came preinstalled on a user's device. This enables you to send information from users who didn't download your app from a campaign.
Control whether preinstall measurement is enabled by calling the setPreinstallTrackingEnabled
method of your AdjustConfig2dx
instance with a bool
argument.
The Adjust SDK provides 5 methods for measuring preinstalled apps:
- System Properties.
- Content provider.
- System Installer Receiver.
- World Readable Directory.
- Default link token.
System properties
Original Equipment Manufacturer (OEM) partners can leverage Android system properties to attribute preinstalled apps. The OEM (Original Equipment Manufacturer) writes attribution information to a file and adds its path to the system properties. The Adjust SDK reads this file on initialization to attribute the install.
Content provider
The content provider method makes use of a read-only content provider. The SDK uses a content resolver to gather preinstall information from the request.
To set the permissions, add the following to your AndroidManifest.xml
file.
To access a list of preinstalled apps on the device, add the following to your AndroidManifest.xml
file.
System installer receiver
The system installer method uses a broadcast receiver. The system installer broadcasts preinstall information. The Adjust SDK reads this information using the system preinstall referrer receiver.
To set up the receiver, add the following to your AndroidManifest.xml
file.
World-readable directory
Save attribution information for your preinstalled app in a world-readable directory. The SDK reads the information from this file at install to attribute the user. The system encryption protocol protects app data.
To give the Adjust SDK access to this information, call the setPreinstallFilePath
method of your AdjustConfig2dx
instance with the path of your file.
Default link token
Configuring a default link token enables you to attribute all preinstalls to a predefined Adjust link. Adjust records all information against this token until the attribution source changes. To set this up:
Copy this token and assign it to the
DefaultTracker
property of yourAdjustConfig2dx
instance in your app delegate file.Build and run your app. If you have logging enabled, you should see a message in your log