-
Notifications
You must be signed in to change notification settings - Fork 1
4. Getting the referrer content
Ali Nasrabadi edited this page Oct 21, 2025
·
2 revisions
After you have established a connection to the CafeBazaar app, get the referrer content by completing the following steps:
- Use the synchronized
getReferrerDetails()method to return an instance ofReferrerDetails. - Use the methods that the
ReferrerDetailsclass provides to get details about the referrer.
The following code demonstrates how you can access the referrer content:
private fun getReferrer() {
referrerClient.getReferrerDetails()?.let { referrerDetails ->
referrerDetails.referrerClickTimestampMilliseconds // This is the time when the user opens your app detail page.
referrerDetails.installBeginTimestampMilliseconds // This is the time when the user tap on the install button.
referrerDetails.appVersion // This is the version of your application.
referrerDetails.referrer // This is the referrer content that you have passed through the deep link.
} ?: run {
_errorMessage.postValue("THERE IS NO REFERRER")
}
}