InstallReferrer Extension - Play Install Referrer Library (2.2)

InstallReferrer - Play Install Referrer Library (2.2)


You can use the Google Play Store’s Install Referrer API to securely retrieve referral content from Google Play. The Play Install Referrer API Client Library is written in the Java programming language and is a wrapper for the Android Interface Definition Language (AIDL) file that defines the interface to the Install Referrer service. You can use the Play Install Referrer API Client Library to simplify your development process.

This guide covers the basics of retrieving referral information from Google Play using the Play Install Referrer Library.

image

Start Connecton


Before you can use the Play Install Referrer API Library, you must establish a connection to the Play Store app. Call the StartConnection to establish a connection to Google Play.

blocks

End Connection


After getting referrer information, call the EndConnection to close the connection. Closing the connection will help you avoid leaks and performance problems.

blocks (1)

Connected


Connection established.

blocks (2)

Disconnected


Try to restart the connection on the next request to Google Play by calling the StartConnection method.

blocks (3)

ConnectionError


Read the message param to know about the error.

blocks (4)

GetReferrerDetails


After you have established a connection to the Play Store app, get the details from the install referrer.

Caution: The install referrer information will be available for 90 days and won’t change unless the application is reinstalled. To avoid unnecessary API calls in your app, you should invoke the API only once during the first execution after install.

blocks (5)

GotReferrerDetails


referrerUrl: The referrer URL of the installed package.
referrerClickTime: The timestamp in seconds when referrer click happens.
appInstallTime: The timestamp in seconds when installation begins.
googlePlayInstant: Boolean indicating if the user has interacted with the app’s instant experience in the past 7 days.

blocks (6)

ReferrerDetailsFailed


This event will be triggered when the extension failed to get referrer details.

blocks (7)

Example -


Referrer Url:

https://play.google.com/store/apps/details?id=com.example.app&referrer=your-code-here

Blocks:


My more extensions


Extension specifications:



7 Likes

Amazing.
Thanks for This.

Thank u so much man best extension for me​:heart::heart::heart:

@JEWEL

Hi, this is awesome extension if I undersand it correctly.

I am bit new on the referral subject, How does anyone refer the app to start with.

Is it something like this?

https://play.google.com/store/apps/details?id=com.example.app&referrer=example_referral_code_here

So, would the referrerUrl contain the above link?

Thanks
Mohan

This may help you…

How can we use this in kodular? Some examples?

Error

Oh sorry for coding mistake, I’ve updated it now. Please re-download it from my github repository.

1 Like

Nice extension :heart: :heart: :heart:

1 Like

Built referral system using this extension successfully thank u so much man​:heart_eyes::grin::grin:

1 Like


Simple blocks

Hey @JEWEL I recently used this extension in my app but I whan I published app in playstore after update then open app app automatically close

Capture device logs and share.

I share you app link