This documentation provides technical reference for using the Play Install Referrer API. The Play Install Referrer API is an AIDL Service Interface) primarly used by non-Java programmers.
Note: The Play Install Referrer Library provides a wrapper around the Play Install Referrer API and is designed to help Java programmers use the API.
The getInstallReferrer() method
This method returns the app install referrer information corresponding to the
given package name sent through a
Bundle (key mapped in table 1). In the
Bundle sent by Google Play, the referral information is stored in
fields mapped to the keys detailed in table 2.
||The package name of the caller, used for disambiguation.|
||The referrer url of the installed package.|
||The timestamp in seconds when referrer click happens.|
||The timestamp in seconds when installation begins.|
Caution: The install referrer information will be
available for 90 days and won't change unless the application is
reinstalled. To avoid unecessary API calls in your app, you should invoke the
API only once during the first execution after install. Your app can listen
to the system broadcast
Intent.ACTION_PACKAGE_FIRST_LAUNCH to identify the app's first
execution. For details about how to handle a broadcast, check the
Receiving broadcasts section.