java.lang.Object | ||
↳ | android.content.BroadcastReceiver | |
↳ | com.appbrain.ReferrerReceiver |
This class receives the install string from the Android market. It should be included in the AndroidManifest (within the application tag) like this:
<receiver android:name="com.appbrain.ReferrerReceiver" android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER"/>
</intent-filter>
</receiver>
If you have custom receivers that you also want to have notified, you can
specify them using meta-data parameters, like for instance in the following
snippet, where both the analytics and AdMob install receivers are notified of
a referrer as well (android.name can be any value as long as it starts with
"forward."):
<receiver android:name="com.appbrain.ReferrerReceiver" android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER"/>
</intent-filter>
<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>
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Receive the referrer String from the Android market.
| |||||||||||
Retrieve the saved referrer String from the Android market.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Receive the referrer String from the Android market.
Retrieve the saved referrer String from the Android market.
context | The current Android context |
---|