对于Android应用初始配置 [英] Initial Configuration for Android App

查看:116
本文介绍了对于Android应用初始配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能必须通过谷歌的一些片传递到应用程序上的第一应用运行数据通过播放链接(也许作为一个意图)。

Is it possible to have some piece of data passed in to the app on the very first app run through via the Google Play link (maybe as an Intent).

我想象的场景是这样的:

The scenario I envision is this:


  1. 我分享一个特殊的URL来我在市场上应用的特殊客户(促销等)

  2. 他们下载的应用程序,安装应用程序。

  3. 在第一次运行时,我可以拉过我放在URL莫名其妙的数据

  4. 魔法发生

目前的解决方案

我目前的解决了这个问题发出了一个通用的纽带,以市场,并有他们点击我的应用程序有一个意向过滤器的第二个URL 。我很想只有一个网址供人点击。

My current solution to this problem is sending out a generic link to the market, and have a second url that they click that my app has an intent-filter. I'd really like to have only one url for people to click.

的思考

我考虑的一个选择,是有链接到我的服务器,保存HTTP请求的一些独特的信息,然后尝试在第一个应用程序运行Web请求信息进行关联,但似乎非常容易出错(IP是不是在NAT后面的Wi-Fi唯一的,用户代理不匹配......)。

An alternative I've considered, is having the link go to my server, save some unique information about the HTTP Request, then try to correlate that information with a web request on the first app run, but that seems very error prone (IP isn't unique on Wi-Fi behind a NAT, User Agents don't match...).

任何意见将是极大的AP preciated。

Any advice would be greatly appreciated.

推荐答案

有对 com.android.vending.INSTALL_REFERRER 意图的搜索。 此源,例如说:

Have a search for the com.android.vending.INSTALL_REFERRER Intent. This source, for example, says:

与Android 1.6开始,Android市场的发出广播
  意向命名com.android.vending.INSTALL_REFERRER一定时
  参数被添加到市场的网址。需要注意的是网页版
  市场也将这些参数传递到在安装设备。

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.

我不知道怎么了最新的或很好的支持,也就是说,但它听起来像是你想要的。

I have no idea how up-to-date or well-supported that is, but it sounds like what you want.

这篇关于对于Android应用初始配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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