Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/234.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 安卓谷歌游戏意向推荐人_Android_Android Intent_Google Analytics_Google Play_Referrer - Fatal编程技术网

Android 安卓谷歌游戏意向推荐人

Android 安卓谷歌游戏意向推荐人,android,android-intent,google-analytics,google-play,referrer,Android,Android Intent,Google Analytics,Google Play,Referrer,我正在像这样启动Google Play: Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.example")); intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_CLEAR

我正在像这样启动Google Play:

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.example"));                                                           
intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
startActivity(intent);
我希望包括推荐人数据,如下所述: 不幸的是,它生成了指向google play网站的url。意图的等价物是什么?如果有一个示例源代码,我将不胜感激


谢谢。

将推荐人数据添加到Google Play链接与在web上添加应用程序内链接的效果相同:

您可以通过市场URI中的
referer
参数添加referer数据,即:

market://details?id=com.example&referrer=utm_source%3Dmyapp%26utm_medium%3Dcross-sell
如果用户选择安装您链接到的应用程序,Google Play应用程序应在安装过程中将
referer
参数的值作为字符串额外传递到
com.android.vending.install\u referer
intent中


请注意,对于从Google Play Store网站启动的远程安装,不会传递推荐人数据。

请检查您是否在清单文件中提到了此接收人。如果有,您将获得相同的信息。否则,请添加到清单文件中

<receiver android:name="com.google.android.apps.analytics.AnalyticsReceiver" android:exported="true">
  <intent-filter>
    <action android:name="com.android.vending.INSTALL_REFERRER" />
  </intent-filter>
</receiver>

应该是工作