Do I get INSTALL_REFERRER intent from amazon app store?

1.1k Views Asked by At

I couldn't find any documentation that mentions whether Amazon app store sends a referral Intent post install, as Google Play does. Though Amazon's documentation does say that we can set referrer information in the URL under "ref" (compared to "referrer" in Google Play), it doesn't explicitly say how they will be passed on to the application.

If I do receive the Intent, should I do

extras.getString("ref")

instead of

extras.getString("referrer")

?

2

There are 2 best solutions below

0
On

I had the same question, I ask by mail to a Amazon, this was his feedback:

Unfortunately we do not have this functionality available for developers.

enter image description here

I insist but they said me the same, there is no way.

So there is no method to get amazon referrer, pretty awfull...

You cannot identify a unique referrer, just have a bunch of Amazon apps installation events by a constant on your code.

1
On

In your Manifest file should be have

 <receiver android:name="com.test.Receiver" android:exported="true">
   <intent-filter>
       <action android:name="com.android.vending.INSTALL_REFERRER" />
   </intent-filter>
</receiver>

and create the class for receiver like this

public class Receiver extends BroadcastReceiver {

@Override
public void onReceive(Context context, Intent intent) {

    Bundle extras = intent.getExtras();
    String referrerString = extras.getString("referrer");

    Log.w("test", "Referrer is: " + referrerString);
}

}

Make sure this will help you