Package 

Interface AppOpenReferrerManager

    • Method Summary

      Modifier and Type Method Description
      abstract Unit collectWebReferrerFromNewActivity(Activity activity) Collects and stores the web referrer from newly created activities, if available.
      abstract String getWebReferrer(Activity activity) Returns a non-null value if the app is opened from a web link, such as clicking on an app link in a search engine.
      abstract String getAppReferrer(Activity activity) Returns a non-empty value if the app has any open referrer, whether it is a web referrer or an app referrer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • collectWebReferrerFromNewActivity

         abstract Unit collectWebReferrerFromNewActivity(Activity activity)

        Collects and stores the web referrer from newly created activities, if available. This method handles the case of a trampoline activity, where the trampoline activity launches another activity and the original web referrer is replaced with the app referrer. The collected web referrer is stored for later use.

      • getWebReferrer

         abstract String getWebReferrer(Activity activity)

        Returns a non-null value if the app is opened from a web link, such as clicking on an app link in a search engine. The returned value is the URI of the search engine that the app was opened from. Examples of possible return values include "https://www.bing.com/", "https://www.google.com/", etc. If the app was not opened from a web link, the method returns null. Additionally, calling this method clears any stored trampoline web referrer, if present.

      • getAppReferrer

         abstract String getAppReferrer(Activity activity)

        Returns a non-empty value if the app has any open referrer, whether it is a web referrer or an app referrer. For a web referrer, the returned value could be something like "https://www.bing.com/". For an app referrer, the returned value could be something like "android-app://com.android.vending". If the app does not have any open referrer, the method returns an empty value.