INSTALL_REFERRER not received on production

我的未来我决定 提交于 2019-12-11 02:48:50

问题


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:


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 ?



来源:https://stackoverflow.com/questions/31047924/install-referrer-not-received-on-production

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!