No broadcast completed INSTALL_REFERRER

871 Views Asked by At

I'm trying to have install referrer on my android app, but failed for something.

I need to receive variables when someone download/install my app form appstore. So I install a cordova plugin, android-referrer-plugin, into my app. And then try it:

adb shell

and then

am broadcast -a com.android.vending.INSTALL_REFERRER \
-n com.mypackage.app/com.eightz.mobile.cordova.plugin.android.referrer.Receiver \
--es "referrer" "This is my referrer"

And then I've got a response like this:

Broadcasting: Intent { act=com.android.vending.INSTALL_REFERRER cmp=com.mypackage.app/com.eightz.mobile.cordova.plugin.android.referrer.Receiver (has extras) }

And that's it.. I don't see

Broadcast completed: result=0

I'm not sure if it's long loading for something or what, but I never see this line, and I cannot further on. I check if I can get the variable, but I just got empty variable. No error though..

Could someone point my mistake here?

1

There are 1 best solutions below

3
On
Did you regsiter broadcast receiver in manifest. Did you set intent filter to that receiver in manifest too. 

<receiver android:name="com.mobileapptracker.Tracker" android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>