Compartilhar via


Intent.ActionSendMultiple Field

Definition

Activity Action: Deliver multiple data to someone else.

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

Field Value

Implements

Attributes

Remarks

Activity Action: Deliver multiple data to someone else.

Like #ACTION_SEND, except the data is multiple.

Input: #getType is the MIME type of the data being sent. get*ArrayListExtra can have either a #EXTRA_TEXT or #EXTRA_STREAM field, containing the data to be sent. If using #EXTRA_TEXT, you can also optionally supply #EXTRA_HTML_TEXT for clients to retrieve your text with HTML formatting.

Multiple types are supported, and receivers should handle mixed types whenever possible. The right way for the receiver to check them is to use the content resolver on each URI. The intent sender should try to put the most concrete mime type in the intent type, but it can fall back to <type>/* or */* as needed.

e.g. if you are sending image/jpg and image/jpg, the intent's type can be image/jpg, but if you are sending image/jpg and image/png, then the intent's type should be image/*.

As of android.os.Build.VERSION_CODES#JELLY_BEAN, the data being sent can be supplied through #setClipData(ClipData). This allows you to use #FLAG_GRANT_READ_URI_PERMISSION when sharing content: URIs and other advanced features of ClipData. If using this approach, you still must supply the same data through the #EXTRA_TEXT or #EXTRA_STREAM fields described below for compatibility with old applications. If you don't set a ClipData, it will be copied there for you when calling Context#startActivity(Intent).

Starting from android.os.Build.VERSION_CODES#O, if #CATEGORY_TYPED_OPENABLE is passed, then the Uris passed in either #EXTRA_STREAM or via #setClipData(ClipData) may be openable only as asset typed files using ContentResolver#openTypedAssetFileDescriptor(Uri, String, Bundle).

Optional standard extras, which may be interpreted by some recipients as appropriate, are: #EXTRA_EMAIL, #EXTRA_CC, #EXTRA_BCC, #EXTRA_SUBJECT.

Output: nothing.

Java documentation for android.content.Intent.ACTION_SEND_MULTIPLE.

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