LaunchData

public class LaunchData extends AbstractSafeParcelable

Data for launching an instant app.

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

Inherited Constant Summary

Field Summary

public static final Creator<LaunchData> CREATOR

Public Method Summary

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)

Inherited Method Summary

Fields

public static final Creator<LaunchData> CREATOR

Public Methods

public Bitmap getApplicationIcon ()

Returns the application icon for the instant app.

Returns
  • 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
  • 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
  • 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
  • the package name of the instant app if one exists for the URL. Otherwise, null.

public void writeToParcel (Parcel dest, int flags)