从Android电子市场更新应用后推荐人

Rom*_*zak 9 android google-analytics google-play

在我的应用程序中,我实现了一个广播接收器,它捕获com.android.vending.INSTALL_REFERRERAndroid从市场安装应用程序后启动的意图.

我在此处详细了解:http://code.google.com/mobile/analytics/docs/android/#referrals

这个推荐人也会抓住更新吗?换句话说,用户可以使用引荐来源和更新应用程序打开Goog​​le Play商店吗?

Mat*_*ini 8

不,Google Play商店com.android.vending.INSTALL_REFERRER在安装应用程序时不会发送意图.

如果您的应用程序的包名称是com.example.android您的URL将是这样的.

https://play.google.com/store/apps/details?id=com.example.android&referrer=testReferrer
Run Code Online (Sandbox Code Playgroud)

在未安装应用程序的情况下打开URL时,您可以在logcat中看到来自Play商店的此调试日志:

1857-1857/com.android.vending D/Finsky:[1] 1.run:捕获com.example.android的引用者

在安装应用程序时打开相同的URL时,您可以看到此日志:

1857-1857/com.android.vending D/Finsky:[1] 1.run:删除了com.example.android的引用,因为已经安装了