adjust-icon

Send preinstalled app activity

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 bool preinstallTrackingEnabled property that controls this feature. To enable preinstall measurement, call the setPreinstallTrackingEnabled method with a true argument.

AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox, true);
//...
adjustConfig.setPreinstallTrackingEnabled(true);
//...
Adjust.start(adjustConfig);

The Adjust SDK provides 5 methods for measuring preinstalled apps:

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.

AndroidManifest.xml
<uses-permission android:name="com.adjust.preinstall.READ_PERMISSION"/>

To access a list of preinstalled apps on the device, add the following to your AndroidManifest.xml file.

AndroidManifest.xml
<queries>
<intent>
<action android:name="com.attribution.REFERRAL_PROVIDER"/>
</intent>
</queries>

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.

AndroidManifest.xml
<receiver android:name="com.adjust.sdk.AdjustPreinstallReferrerReceiver">
<intent-filter>
<action android:name="com.attribution.SYSTEM_INSTALLER_REFERRER" />
</intent-filter>
</receiver>

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.

AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox, true);
//...
adjustConfig.setPreinstallFilePath("../EngagementFile.xml");
//...
Adjust.start(adjustConfig);

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:

  1. Create a new campaign link in Campaign Lab.

    https://app.adjust.com/{token}
  2. Copy this token and pass it to the setDefaultTracker method in your app delegate file.

    AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox);
    //...
    adjustConfig.setDefaultTracker("{TrackerToken}");
    //...
    Adjust.start(adjustConfig);
  3. Build and run your app. If you have logging enabled, you should see a message in your log

    Default tracker: 'abc123'.