public class ActivityCompat
extends java.lang.Object
| Constructor and Description |
|---|
ActivityCompat() |
| Modifier and Type | Method and Description |
|---|---|
static android.net.Uri |
getReferrer(android.app.Activity activity)
Return information about who launched this activity.
|
public static android.net.Uri getReferrer(android.app.Activity activity)
Intent.EXTRA_REFERRER,
that will be returned as-is; otherwise, if known, an
android-app: referrer URI containing the
package name that started the Intent will be returned. This may return null if no
referrer can be identified -- it is neither explicitly specified, nor is it known which
application package was involved.
If called while inside the handling of Activity.onNewIntent(android.content.Intent), this function will
return the referrer that submitted that new intent to the activity. Otherwise, it
always returns the referrer of the original Intent.
Note that this is not a security feature -- you can not trust the referrer information, applications can spoof it.