INSTALL_REFERRER not received on production

712 Views Asked by At

I'm not getting install referrer received on application installed from the play store. Below is my Androidmanifest.xml shows receiver which is inside <application> tag too.

  <receiver
        android:name="com.usplnew.getreferrer.CustomReceiver"
        android:exported="true" >
        <intent-filter>
            <action android:name="com.android.vending.INSTALL_REFERRER" />
        </intent-filter>
    </receiver>

And below is code for Receiver

public class CustomReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        System.out.println("sgn RECEIVED");
        Log.d("YES", "IT WORKS!!");
        Toast.makeText(context, "Received Intall Referrer", Toast.LENGTH_SHORT)
                .show();
    }
}

Its working well with below command on emulator and device too

adb shell am broadcast -a com.android.vending.INSTALL_REFERRER -n com.uspl.getrefferer/com.uspl.getrefferer.CustomReceiver --es "referrer" "https://play.google.com/store/apps/details?id=com.NextGen.Water.Run&referrer=IWantThisReferrer"

I also put the same below code into the app into the production on Google Play. But INSTALL REFERRER is not received when the application is installed.

I would highly appreciate if someone guide where I'm wrong.

Thanks in Advance!

1

There are 1 best solutions below

0
On

Have you checked your implementation of your own class of BroadcastReceiver with this documentation - https://developers.google.com/analytics/devguides/collection/android/v1/devguide#campaigns ?