[Paid] Install Referrer Extension

standard (1)

The InstallReferrer extension for MIT App Inventor allows you to interact with the Google Play Store to retrieve install referrer information. This includes details about the referrer URL, click timestamp, install timestamp, and whether the app was installed via Google Play Instant.

Methods

FetchAppInstallTime

  • Description: Retrieves the app install time in seconds since the Unix epoch. This indicates when the app was first installed.
  • Return Type: Number
  • Block Screenshot: FetchAppInstallTime Block

FetchGooglePlayInstantParam

  • Description: Checks if the app was installed via Google Play Instant. Returns true if installed via Google Play Instant, otherwise false.
  • Return Type: Boolean
  • Block Screenshot: FetchGooglePlayInstantParam Block

FetchReferrerClickTime

  • Description: Retrieves the referrer click time in seconds since the Unix epoch. This indicates when the referrer URL was clicked.
  • Return Type: Number
  • Block Screenshot: FetchReferrerClickTime Block

FetchReferrerDetails

  • Description: Fetches install referrer details from the Play Store. Includes referrer URL, referrer click timestamp, app install timestamp, and Google Play Instant status. Should be called only once after app installation.
  • Block Screenshot: FetchReferrerDetails Block

GetDeepLinkUrl

  • Description: Retrieves the deep link URL from the referrer details if available. Assumes the deep link is part of the referrer URL.
  • Return Type: Text
  • Block Screenshot: GetDeepLinkUrl Block

InitiateConnection

  • Description: Initiates a connection to the Google Play Store to retrieve install referrer information. Includes automatic retry logic. On success, the OnConnectionEstablished event is triggered.
  • Block Screenshot: InitiateConnection Block

IsReferrerDetailsFetched

  • Description: Checks if the referrer details have already been fetched. Returns true if details have been fetched, otherwise false.
  • Return Type: Boolean
  • Block Screenshot: IsReferrerDetailsFetched Block

IsReferrerFeatureSupported

  • Description: Checks if the Install Referrer API is supported on the device. Returns true if supported, otherwise false.
  • Return Type: Boolean
  • Block Screenshot: IsReferrerFeatureSupported Block

ResetFetchedState

  • Description: Resets the fetched state to allow fetching referrer details again. Use with caution, as referrer details are typically only fetched once after installation.
  • Block Screenshot: ResetFetchedState Block

TerminateConnection

  • Description: Ends the connection to the Google Play Store. Should be called to release resources once referrer details are retrieved.
  • Block Screenshot: TerminateConnection Block

WasReferrerClickedRecently

  • Description: Checks if the install referrer was clicked within the last 24 hours. Returns true if the click occurred within the last 24 hours, otherwise false.
  • Return Type: Boolean
  • Block Screenshot: WasReferrerClickedRecently Block

Events

OnConnectionEstablished

  • Description: Triggered when the connection to the Play Store is established or fails. The success parameter indicates if the connection was successful.

  • Parameter:

    • success (Boolean)
  • Block Screenshot: OnConnectionEstablished Block

OnDisconnected

  • Description: Triggered when the connection to the Play Store is unexpectedly disconnected.
  • Block Screenshot: OnDisconnected Block

OnReferrerDetailsFetchFailed

  • Description: Triggered when there is an error fetching the referrer details. Provides an error message describing the failure.

  • Parameter:

    • error (Text)
  • Block Screenshot: OnReferrerDetailsFetchFailed Block

OnReferrerDetailsFetched

  • Description: Triggered when referrer details are successfully retrieved. Provides referrer URL, referrer click timestamp, app install timestamp, and Google Play Instant status.

  • Parameters:

    • referrerUrl (Text)
    • referrerClickTime (Number)
    • appInstallTime (Number)
    • googlePlayInstant (Boolean)
  • Block Screenshot: OnReferrerDetailsFetched Block

Click to Download
2 Likes

Some free similar extension is available in community

2 Likes