从谷歌播放在安装时传递参数给应用程序 [英] Pass param to app when installed from Google Play

查看:285
本文介绍了从谷歌播放在安装时传递参数给应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要支持以下情形:

用户收到的电子邮件与链接到我的应用程序。

User receives the e-mail with link to my app.

如果用户已经安装了应用程序的链接应该打开应用程序传递的意图一些数据的发射活动。

If user already has the app installed the link should open the app passing some data in the intent to the launcher activity.

如果该应用程序尚未安装的电子邮件链接应作为活动引荐:直接用户到谷歌播放安装与传递给我的应用程序安装在引荐广播接收器后,引用网址的应用程序

If the app is not installed yet the e-mail link should act as campaign referrer: direct user to Google Play to install the app with referrer url that is passed to my app after installation in referrer broadcast receiver.

推荐答案

您需要截取的 com.android.vending.INSTALL_REFERRER 意图,这是由谷歌播放广播该应用被打开的安装后第一次之后,和捕捉数据在该意向。 URI中的参数,用于启动谷歌播放将沿着引用字符串额外的传递。 (虽然你被限制到允许PARAMS的列表,请参阅该表中的官方文档。)

You need to intercept the com.android.vending.INSTALL_REFERRER Intent, which is broadcast by Google Play after the app is opened for the first time after installation, and catch the data in that Intent. The parameters in the URI used to launch Google Play will be passed along in the referrer String extra. (Though you are limited to a list of allowed params, see the official docs for that table.)

https://developers.google.com/analytics/devguides/collection/android/v4/campaigns

这篇关于从谷歌播放在安装时传递参数给应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆