Intent.ExtraReplacementExtras Field

Definition

A Bundle forming a mapping of potential target package names to different extras Bundles to add to the default intent extras in #EXTRA_INTENT when used with #ACTION_CHOOSER.

[Android.Runtime.Register("EXTRA_REPLACEMENT_EXTRAS")]
public const string ExtraReplacementExtras;
[<Android.Runtime.Register("EXTRA_REPLACEMENT_EXTRAS")>]
val mutable ExtraReplacementExtras : string

Field Value

Implements

Attributes

Remarks

A Bundle forming a mapping of potential target package names to different extras Bundles to add to the default intent extras in #EXTRA_INTENT when used with #ACTION_CHOOSER. Each key should be a package name. The package need not be currently installed on the device.

An application may choose to provide alternate extras for the case where a user selects an activity from a predetermined set of target packages. If the activity the user selects from the chooser belongs to a package with its package name as a key in this bundle, the corresponding extras for that package will be merged with the extras already present in the intent at #EXTRA_INTENT. If a replacement extra has the same key as an extra already present in the intent it will overwrite the extra from the intent.

<em>Examples:</em> <ul> <li>An application may offer different #EXTRA_TEXT to an application when sharing with it via #ACTION_SEND, augmenting a link with additional query parameters for that target.</li> <li>An application may offer additional metadata for known targets of a given intent to pass along information only relevant to that target such as account or content identifiers already known to that application.</li> </ul>

Java documentation for android.content.Intent.EXTRA_REPLACEMENT_EXTRAS.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to