3

I want to implement an app invitation, which I can share to users via a link

Hi, you've been invited to so and so. Click here to accept! http://myapp.com/?foo1=bar1&foo2=bar2

The link itself will redirect to the google play store, but I want to keep the foo1 = bar1, foo2 = bar2. And when the application has been launched, I want to get that data and do something with it.

Is this at all possible?

If there's not, is there another way that I could go about this?

Thanks!

TomH
  • 2,581
  • 1
  • 15
  • 30
  • What exactly are you trying to achieve? – shiredude95 Jun 11 '18 at 00:03
  • To pass data in on a first install event. That way, I can still retain the invitation information and perform the necessary tasks. – TomH Jun 11 '18 at 06:48
  • well if you want to do something of that effect you can simply use a sharedpreference to make sure the information is only asked once after fresh install. You can make the user pass the info or auto send the info to the user if that is what you want. – shiredude95 Jun 11 '18 at 06:51

2 Answers2

3

getting data from the download url

`https://play.google.com/store/apps/details?id=com.example.myapp&referrer=utm_content%3Dgroup232`

after first install, get the referrer and its content (eg. get "group232")

Check here for more details https://developer.android.com/google/play/installreferrer/library

Dan Alboteanu
  • 9,404
  • 1
  • 52
  • 40
2

You could use the Google Play referrer API. There is a a library, the Play Install Referrer Library which wraps this in a slightly easier to use interface.

Nick Fortescue
  • 13,530
  • 1
  • 31
  • 37