LaunchData

public classLaunchDataextendsObject
implementsParcelable

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 finalCreator<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 theIntent to launch the instant app.
String
getPackageName()
Returns the package name of the instant app.
void
writeToParcel(Parceldest, int flags)

Inherited Method Summary

Fields

public static finalCreator<LaunchData> CREATOR

Public Methods

publicBitmap 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.

publicStringgetApplicationLabel()

Returns the label for the instant app.

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

publicIntent getIntent()

Returns theIntentto launch the instant app.

The caller should add theEXTRA_REFERRER extra to the returned instant app Intent, with theUriof 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_TRUSTEDextra may be set true.

For clicks within the caller, the EXTRA_TRUSTED_REFERRER_PKGshould 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
  • theIntentto launch the instant app if one exists for the URL. Otherwise,null.

publicStringgetPackageName()

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 voidwriteToParcel(Parceldest, int flags)