0

I share my app link to my friend with invitation id.

This is the link of my app in google play with invitation id that i shared with my friend

https://play.google.com/store/apps/details?id=com.manticsol.coucou.pk&inviteid=4352627

Now my friend install the app using my link that i shared with him. Can anyone tell me how can i get the invitation id programmatically in my app when my friend will install app using my link

I know that this intent is called when app installed first time from play store but i don't know how can i able to get the inviteId

       <intent-filter>
            <action android:name="com.android.vending.INSTALL_REFERRER" />
        </intent-filter>

I got a little bit help from this link

Android - Is it possible to get install referrer programmatically

But when i implemented this thing in my app. i am getting this response in logcat

utm_source=(not%20set)&utm_medium=(not%20set)

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
  • Possible duplicate of [Android - Is it possible to get install referrer programmatically](https://stackoverflow.com/questions/30103338/android-is-it-possible-to-get-install-referrer-programmatically) – Mikhail Olshanski May 15 '19 at 10:18
  • hi Mikhail i implemented same thing but i am not able to get information. – Muhammad Ali May 15 '19 at 10:22
  • when i implemented then i got this response utm_source=(not%20set)&utm_medium=(not%20set) can you help me to solve my issue please. – Muhammad Ali May 15 '19 at 10:24

1 Answers1

1

You can't just use any old string you want - in this case inviteid. You have to use a referrer argument, then you can put other sub arguments inside it like this:

https://play.google.com/store/apps/details?id=com.foo.bar&referrer=utm_source%3Dmyreferrer%26utm_medium%3Demail%26utm_term%3Dshoes%26utm_content%3Dfoo%26utm_campaign%3Dcampaign

Various online tools like this one help you build the URL correctly.

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