The InstallReferrer extension for MIT App Inventor allows you to retrieve Install Referrer information from Google Play. It provides methods to fetch various referrer details and events related to the connection with the Play Store.
- Description: Retrieves the app install time in seconds since the Unix epoch. This is the timestamp when the app was first installed.
- Return Type:
number
- Block Screenshot:
- Description: Checks if the app was installed via Google Play Instant. Returns
true
if the app was installed via Google Play Instant,false
otherwise. - Return Type:
boolean
- Block Screenshot:
- Description: Retrieves the referrer click time in seconds since the Unix epoch. This is the timestamp when the referrer URL was clicked.
- Return Type:
number
- Block Screenshot:
- Description: Fetches install referrer details from the Play Store, including the referrer URL, the timestamp when the referrer was clicked, the timestamp when the app was installed, and whether the app was installed via Google Play Instant. This method should be called only once after the app is installed, as referrer details can only be fetched once.
- Block Screenshot:
- Description: Retrieves the deep link URL from the referrer details, if available. This method assumes the deep link is part of the referrer URL.
- Return Type:
text
- Block Screenshot:
- Description: Initiates the connection to the Google Play Store to retrieve install referrer information. This method includes automatic retry logic to handle cases where the Play Store service is unavailable. If the connection is successful, the
OnConnectionEstablished
event will be triggered. - Block Screenshot:
- Description: Checks if the referrer details have already been fetched. Returns
true
if the details have been fetched,false
otherwise. - Return Type:
boolean
- Block Screenshot:
- Description: Checks if the Install Referrer API is supported on this device. Returns
true
if supported,false
otherwise. - Return Type:
boolean
- Block Screenshot:
- Description: Resets the fetched state to allow fetching referrer details again. Use this function with caution as referrer details are typically only fetched once after install.
- Block Screenshot:
- Description: Ends the connection to the Google Play Store. This should be called to release resources once the referrer details have been successfully retrieved.
- Block Screenshot:
- Description: Checks if the install referrer was clicked within the last 24 hours. Returns
true
if the click occurred within the last 24 hours,false
otherwise. - Return Type:
boolean
- Block Screenshot:
- Description: Triggered when the connection to the Play Store is either established successfully or fails. The
success
parameter indicates whether the connection was successful (true
) or not (false
). - Parameter:
success
(boolean
)
- Block Screenshot:
- Description: Triggered when the connection to the Play Store is unexpectedly disconnected.
- Block Screenshot:
- Description: Triggered when the referrer details are successfully retrieved. The event provides the referrer URL, the timestamp of the referrer click, the timestamp of the app install, and whether the app was installed via Google Play Instant.
- Parameters:
referrerUrl
(text
)referrerClickTime
(number
)appInstallTime
(number
)googlePlayInstant
(boolean
)
- Block Screenshot:
- Description: Triggered when there is an error while fetching the referrer details. The
error
parameter provides a message describing the failure. - Parameter:
error
(text
)
- Block Screenshot:
This documentation should help you understand and utilize the InstallReferrer extension in MIT App Inventor. If you need further assistance or have additional questions, feel free to ask!