Multiple broadcast receivers

The Adjust SDK supports the INSTALL_REFERRER intent using a broadcast receiver. If several sources need to register a receiver, you will need to add your own BroadcastReceiver.

This receiver will call all the other receivers you want to support. Here is an example of a broadcast receiver:

<receiver
    android:name="com.your.app.InstallReceiver"
    android:permission="android.permission.INSTALL_PACKAGES"
    android:exported="true" >
    <intent-filter>
        <action android:name="com.android.vending.INSTALL_REFERRER" />
    </intent-filter>
</receiver>

If you are using your own broadcast receiver, you can pass the intent content to other receivers. Make sure to pass this information to the Adjust broadcast receiver and any others that need it:

public class InstallReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        // Adjust receiver.
        new AdjustReferrerReceiver().onReceive(context, intent);
        // Google Analytics receiver.
        new CampaignTrackingReceiver().onReceive(context, intent);
        // And any other receiver which needs the intent.
    }
}