This class 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.
Data for resolved instant app Intent.
Meant for use by apps that want to launch instant apps, e.g. web browsers.
Nested Class Summary
@interface | InstantAppIntentData.MatchResult | 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. |
Constant Summary
int | RESULT_LAUNCH_OK | URL can be launched |
int | RESULT_NO_LAUNCH | URL could not be launched for an unspecified reason |
int | RESULT_NO_LAUNCH_HOLDBACK | URL could have been launched but was withheld due to a mobile holdback from dev console |
int | RESULT_USER_PREFERS_BROWSER | URL can be launched but the user prefers to use the browser so further consent is necessary |
Inherited Constant Summary
Field Summary
public static final Creator<InstantAppIntentData> | CREATOR |
Public Method Summary
Intent |
getIntent()
Retrieve the Activity Intent used to start the instant app.
|
int |
getMatchResult()
Returns the result for the match attempt of the given URL.
|
String |
getPackageName()
Returns the package name of the instant app if one exists for the URL.
|
void |
writeToParcel(Parcel dest, int
flags)
|
Inherited Method Summary
Constants
public static final int RESULT_LAUNCH_OK
URL can be launched
public static final int RESULT_NO_LAUNCH
URL could not be launched for an unspecified reason
public static final int RESULT_NO_LAUNCH_HOLDBACK
URL could have been launched but was withheld due to a mobile holdback from dev console
public static final int RESULT_USER_PREFERS_BROWSER
URL can be launched but the user prefers to use the browser so further consent is necessary
Fields
public static final Creator<InstantAppIntentData> CREATOR
Public Methods
public Intent getIntent ()
Retrieve the Activity Intent used to start the instant app. Returns null if an instant app does not exist for the URL or if instant apps are disabled. A non-null return value does not guarantee existence of an instant app for the URL.
The caller should add the Intent.EXTRA_REFERRER
extra to the Intent, with the Uri
of the referrer
web page, if available, respecting its referrer policy. If the referrer value
originates within or is validated by the caller then
Launcher.EXTRA_IS_REFERRER_TRUSTED
extra may be set true.
For clicks within the caller, the
Launcher.EXTRA_TRUSTED_REFERRER_PKG
should be set to the package name of the
caller. In other cases, this extra should be set only if the caller can validate the
package name of the originator of the launch.
Returns
- the Intent to attempt the start of an instant app or null if an instant app can't be run for this URL.
public int getMatchResult ()
Returns the result for the match attempt of the given URL.
public String getPackageName ()
Returns the package name of the instant app if one exists for the URL. Otherwise,
null
.