是否有可能通过Google Play链接(也许是Intent
)将某些数据传入第一个应用程序运行的应用程序中。
我设想的场景是这样的:
当前解决方案
我当前针对此问题的解决方案是向市场发送通用链接,并点击另一个网址,他们点击我的应用程序具有
intent-filter
。我真的只希望有一个网址可供人们点击。思想
我考虑过的另一种方法是,将链接转到我的服务器,保存有关HTTP请求的一些唯一信息,然后在首次运行应用程序时尝试将该信息与Web请求相关联,但这似乎很容易出错(IP不在NAT后的Wi-Fi上不是唯一的,用户代理不匹配...)。
任何建议将不胜感激。
最佳答案
搜索com.android.vending.INSTALL_REFERRER
意图。例如This source说:
Starting with Android 1.6, the Android Market's emits a broadcast Intent named com.android.vending.INSTALL_REFERRER whenever certain parameters are added to the market url. Note that web version of the Market also passes these parameters to your devices upon install.
我不知道它是最新的还是得到良好的支持,但这听起来像您想要的。
关于android - Android App的初始配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14857070/