android - Android App的初始配置

标签 android google-play

是否有可能通过Google Play链接(也许是Intent)将某些数据传入第一个应用程序运行的应用程序中。

我设想的场景是这样的:

  • 我为特殊客户(促销等)在市场上为我的应用程序共享了一个特殊URL。
  • 他们下载了该应用程序,然后安装了该应用程序。
  • 在第一次运行时,我可以以某种方式提取放入URL上的数据
  • 魔术发生

  • 当前解决方案

    我当前针对此问题的解决方案是向市场发送通用链接,并点击另一个网址,他们点击我的应用程序具有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/

    相关文章:

    android - 移动设备不支持应用程序

    android - 在使用sbt android-plugin编译的Java项目中指定AndroidManifest.xml的位置

    android - 在移动平台上使用 SVM 或神经网络哪个更​​有效?

    android - 哪种 Activity 生命周期方法最适合注册/取消注册到事件总线?

    java - 如何远程通知android?

    java - Android 应用内捐赠

    Android list Xlarge 屏幕问题

    Android 发布两个具有相同包 ID 的应用程序

    java - 如何从 java 类中读取内容?

    android - 许可证 key 安卓