2

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. I share a special url to my app in the market for special clients (promotion, etc)
  2. They download the app, install the app.
  3. On the first run, I can pull off the data I put on the url somehow
  4. Magic happens

Current Solution

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.

Thoughts

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...).

Any advice would be greatly appreciated.

xbakesx
  • 13,202
  • 6
  • 48
  • 76

1 Answers1

1

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

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.

Graham Borland
  • 60,055
  • 21
  • 138
  • 179
  • This seems like exactly what I am looking for. I wrote up a sample app, but I am not getting any calls to my `BroadcastReceiver`. I will do a little more testing, but from my searching the common hiccups are not configuring your broadcast receiver correctly, or not using an appropriate url and I think I am doing that all correctly. – xbakesx Feb 13 '13 at 21:02