This class keeps track of the install referrer from the Play Store.
The install referrer can be retrieved from Google Play by the referrer API and the AppBrain SDK does this automatically upon first start. The result can then be retrieved with ReferrerReceiver.retrieve(context)
If you have old-style receivers that you also want to have notified, you can manually register ReferrerReceiver in your AndroidManifest, with the other receivers using meta-data parameters, like for instance in the following snippet, where both an Analytics and AdMob install receivers are notified of a referrer. (android:name can be any value as long as it starts with “forward.”):
<receiver android:name="com.appbrain.ReferrerReceiver"> <meta-data android:name="forward.GoogleAnalytics" android:value="com.google.android.apps.analytics.AnalyticsReceiver"/> <meta-data android:name="forward.Admob" android:value="com.google.ads.InstallReceiver"/> <meta-data android:name="forward.AnotherOne" android:value="com.myapp.CustomReceiver"/> </receiver>
onReceive(Context context, Intent intent)
Receive the referrer String from the Android market.