AI-generated Key Takeaways
-
The
ActivityCompatinterface is deprecated and will no longer work after December 2025. -
Developers are encouraged to direct users to their regular app and use deep links for specific features instead of Instant Apps.
-
This helper provides backwards compatible access to
Activityfeatures, particularly related to instant apps. -
Key methods include
getCallingActivity()andgetCallingPackage()to identify the calling activity or package.
This interface is deprecated.Starting December 2025, Instant Apps cannot be published through Google Play, and all Google Play services Instant APIs will no longer work. To continue optimizing for user growth, we encourage developers to refer users to their regular app or game, and using deeplinks to redirect them to specific journeys or features when relevant.
A helper for accessing features in Activity
in a
backwards compatible fashion. Construct this by using InstantApps.getActivityCompat(Activity)
.
This helper augments the included methods with data on instant apps.
Public Method Summary
| abstract ComponentName | |
| 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
- the component name of the activity that started the activity, or null
See Also
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
- the package name of the app that started this activity, or null

