-
- All Implemented Interfaces:
-
com.appsflyer.internal.open_referrer.AppOpenReferrerManager
public final class AppOpenReferrerManagerImpl implements AppOpenReferrerManager
-
-
Constructor Summary
Constructors Constructor Description AppOpenReferrerManagerImpl()
-
Method Summary
Modifier and Type Method Description Unit
collectWebReferrerFromNewActivity(Activity activity)
Collects and stores the web referrer from newly created activities, if available. 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. 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. -
-
Method Detail
-
collectWebReferrerFromNewActivity
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
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
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.
-
-
-
-