How do I implement a referral module onto my android application?

4.9k views Asked by At

I want to implement a refer-a-friend kind of functionality onto my application such that every user will have a unique link directing to the apk and the user can share the link via different mediums. I am done with the generating link part, now I wanted to know how to identify the user hitting the link and also check whether or not the app was installed/downloaded. If it was installed, then I need to add some credits onto the link owner's account. And my issue needs to be resolved without the use of API's. Any help would be appreciated.

2

There are 2 answers

4
Ravi Sisodia On BEST ANSWER

For every user you need to have a unique code stored on your server, like A has FOO766, A has BAR456.

  1. You can use Google's referrer feature. In this method, when you A shares your app to another user, you need to append a A's unique code with your app's Play store link. And when another user installs your app, a BroadcastReceiver of your app will be called, containing the code; with which you can verify referral. More info Google Campaigns.

  2. Or you can do it manually. Whenever a user installs your app, ask him for the referral code, and you can verify the referral condition's over the server & can determine is it valid or not.

8
ViramP On

You can achieve this without api. Create one Label which consist some data. Now add Scheme for that at your application (Manifest). After that write code at First screen which get value from that label.

https://developer.android.com/training/basics/intents/filters.html

FYI :

<a href="your.custom.scheme://some/UniqueNumber/">Myapp</a>