In Many Android Application you can see their is refer Scheme Play Store url of app with some value and on other device we will get referral code or we can can what is the source of url coming from .So to achieve this we have some steps to follow : for example the url is : https://play.google.com/store/apps/details?id=com.droidmedium&referrer=DroidMedium1234 by clicking this url user redirect to Play Store and after installation we have to get the referral value "DroidMedium1234" Step 1: Create a class Name RefererDataReceiver.java package com.droidmedium; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.v4.content.LocalBroadcastManager; import android.util.Log; public class RefererDataReciever extends BroadcastReceiver { public static f...