I am trying to register a broadcast receiver that catches the intent of "com.android.vending.INSTALL_REFERRER" launched by Android after the application is installed from the market.
I read the details here: http://code.google.com/mobile/analytics/docs/android/#referrals
However, I cannot use Google Analytics, so I created my own solution. I added the following to the manifest file:
<receiver android:name="com.test.Receiver" android:exported="true"> <intent-filter> <action android:name="com.android.vending.INSTALL_REFERRER" /> </intent-filter> </receiver>
and created the base class BroadcastReceiver:
public class Receiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Bundle extras = intent.getExtras(); String referrerString = extras.getString("referrer"); Log.w("TEST", "Referrer is: " + referrerString); } }
However, when the application is installed, the receiver does not seem to catch the intent (if the Intent even broadcasts?), And I do not get the log output.
How am I wrong somewhere or does the market no longer launch these intentions when the application is installed?
android install referrer google-play-services google-play
Jake Nov 04 '10 at 1:28 2010-11-04 01:28
source share