Udostępnij za pośrednictwem


Intent.ClipData Property

Definition

Return the ClipData associated with this Intent. -or- Set a ClipData associated with this Intent.

public virtual Android.Content.ClipData? ClipData { [Android.Runtime.Register("getClipData", "()Landroid/content/ClipData;", "GetGetClipDataHandler")] get; [Android.Runtime.Register("setClipData", "(Landroid/content/ClipData;)V", "GetSetClipData_Landroid_content_ClipData_Handler")] set; }
[<get: Android.Runtime.Register("getClipData", "()Landroid/content/ClipData;", "GetGetClipDataHandler")>]
[<set: Android.Runtime.Register("setClipData", "(Landroid/content/ClipData;)V", "GetSetClipData_Landroid_content_ClipData_Handler")>]
member this.ClipData : Android.Content.ClipData with get, set

Property Value

Attributes

Remarks

Property getter documentation:

Return the ClipData associated with this Intent. If there is none, returns null. See #setClipData for more information.

Java documentation for android.content.Intent.getClipData().

Property setter documentation:

Set a ClipData associated with this Intent. This replaces any previously set ClipData.

The ClipData in an intent is not used for Intent matching or other such operations. Semantically it is like extras, used to transmit additional data with the Intent. The main feature of using this over the extras for data is that #FLAG_GRANT_READ_URI_PERMISSION and #FLAG_GRANT_WRITE_URI_PERMISSION will operate on any URI items included in the clip data. This is useful, in particular, if you want to transmit an Intent containing multiple content: URIs for which the recipient may not have global permission to access the content provider.

If the ClipData contains items that are themselves Intents, any grant flags in those Intents will be ignored. Only the top-level flags of the main Intent are respected, and will be applied to all Uri or Intent items in the clip (or sub-items of the clip).

The MIME type, label, and icon in the ClipData object are not directly used by Intent. Applications should generally rely on the MIME type of the Intent itself, not what it may find in the ClipData. A common practice is to construct a ClipData for use with an Intent with a MIME type of "*&#47;*".

Java documentation for android.content.Intent.setClipData(android.content.ClipData).

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

See also