public class

LaunchData

extends Object
implements Parcelable
java.lang.Object
   ↳ com.google.android.gms.instantapps.LaunchData

Class Overview

Data for launching an instant app.

Meant for use by apps that want to launch instant apps, e.g. web browsers.

See also:

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<LaunchData> CREATOR
Public Methods
Bitmap getApplicationIcon()
Returns the application icon for the instant app.
String getApplicationLabel()
Returns the label for the instant app.
Intent getIntent()
Returns the Intent to launch the instant app.
String getPackageName()
Returns the package name of the instant app.
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final Creator<LaunchData> CREATOR

Public Methods

public Bitmap getApplicationIcon ()

Returns the application icon for the instant app.

Returns
Bitmap the application icon for the instant app if one exists for the URL. Otherwise, null.

public String getApplicationLabel ()

Returns the label for the instant app.

Returns
String the label for the instant app if one exists for the URL. Otherwise, null.

public Intent getIntent ()

Returns the Intent to launch the instant app.

The caller should add the EXTRA_REFERRER extra to the returned instant app 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 EXTRA_IS_REFERRER_TRUSTED extra may be set true.

For clicks within the caller, the 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.

Extras to be set in the returned intent, as appropriate, by the caller are EXTRA_REFERRER, EXTRA_TRUSTED_REFERRER_PKG, EXTRA_IS_REFERRER_TRUSTED, EXTRA_IS_USER_CONFIRMED_LAUNCH, EXTRA_APPLICATION_ID, android.nfc.NfcAdapter#EXTRA_NDEF_MESSAGES, android.nfc.NfcAdapter#EXTRA_TAG, and android.nfc.NfcAdapter#EXTRA_ID.

Returns
Intent the Intent to launch the instant app if one exists for the URL. Otherwise, null.

public String getPackageName ()

Returns the package name of the instant app.

Returns
String the package name of the instant app if one exists for the URL. Otherwise, null.

public void writeToParcel (Parcel dest, int flags)

Parameters
dest Parcel
flags int