public interface

ActivityCompat

com.google.android.gms.instantapps.ActivityCompat

Class Overview

A helper for accessing features in Activity in a backwards compatible fashion. Construct this by using getActivityCompat(Activity).

This helper augments the included methods with data on instant apps.

Summary

Public Methods
abstract ComponentName getCallingActivity()
Gets the ComponentName of the activity that launched the intent to start this activity.
abstract String getCallingPackage()
Gets the package name of the app that launched the intent to start this activity.

Public Methods

public abstract ComponentName getCallingActivity ()

Gets the ComponentName of the activity that launched the intent to start this activity. This may be an activity in an installed app or an instant app.

Returns
ComponentName the component name of the activity that started the activity, or null

public abstract String getCallingPackage ()

Gets the package name of the app that launched the intent to start this activity. This may be the package name of an installed app or an instant app.

Returns
String the package name of the app that started this activity, or null