Skip to content

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:

  1. Use the synchronized getReferrerDetails() method to return an instance of ReferrerDetails.
  2. Use the methods that the ReferrerDetails class 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")
        }
    }

Clone this wiki locally