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.
Your config object contains a Boolean
preinstallTrackingEnabled
property that controls this feature. To enable preinstall measurement, call the setPreinstallTrackingEnabled
with a true
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.
Pass the file path at which your preinstall information can be found to the setPreinstallFilePath
method to give the Adjust SDK access to the information.
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 pass it to the
setDefaultTracker
method.
-
Build and run your app. If you have logging enabled, you will see a message in your log.