ACTION_SEND constant

String const ACTION_SEND

Activity Action: Deliver some data to someone else. Who the data is being delivered to is not specified; it is up to the receiver of this action to ask the user where the data should be sent.

When launching a SEND intent, you should usually wrap it in a chooser (through {@link #createChooser}), which will give the proper interface for the user to pick how to send your data and allow you to specify a prompt indicating what they are doing.

Input: {@link #getType} is the MIME type of the data being sent. get*Extra can have either a {@link #EXTRA_TEXT} or {@link #EXTRA_STREAM} field, containing the data to be sent. If using EXTRA_TEXT, the MIME type should be "text/plain"; otherwise it should be the MIME type of the data in EXTRA_STREAM. Use {@literal *}/* if the MIME type is unknown (this will only allow senders that can handle generic data streams). If using {@link #EXTRA_TEXT}, you can also optionally supply {@link #EXTRA_HTML_TEXT} for clients to retrieve your text with HTML formatting.

As of {@link android.os.Build.VERSION_CODES#JELLY_BEAN}, the data being sent can be supplied through {@link #setClipData(ClipData)}. This allows you to use {@link #FLAG_GRANT_READ_URI_PERMISSION} when sharing content: URIs and other advanced features of {@link ClipData}. If using this approach, you still must supply the same data through the {@link #EXTRA_TEXT} or {@link #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 {@link Context#startActivity(Intent)}.

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

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

Output: nothing.

Implementation

static const String ACTION_SEND = "android.intent.action.SEND";