-
public class ActivityCompat
-
-
Method Summary
Modifier and Type Method Description static UrigetReferrer(Activity activity)Return information about who launched this activity. -
-
Method Detail
-
getReferrer
@Nullable() static Uri getReferrer(Activity activity)
Return information about who launched this activity. If the launching Intentcontains an Intent.EXTRA_REFERRER,that will be returned as-is; otherwise, if known, an android-app: referrer URI containing thepackage name that started the Intent will be returned. This may return null if noreferrer can be identified -- it is neither explicitly specified, nor is it known whichapplication package was involved.
If called while inside the handling of onNewIntent, this function willreturn the referrer that submitted that new intent to the activity. Otherwise, italways returns the referrer of the original Intent.
Note that this is not a security feature -- you can not trust thereferrer information, applications can spoof it.
-
-
-
-