Language

DocumentsContract.CategoryApprovedDocumentHandler Field

Definition

Intent category to filter for activities that can handle document intents.

[Android.Runtime.Register("CATEGORY_APPROVED_DOCUMENT_HANDLER", ApiSince=37)]
public const string CategoryApprovedDocumentHandler;
[<Android.Runtime.Register("CATEGORY_APPROVED_DOCUMENT_HANDLER", ApiSince=37)>]
val mutable CategoryApprovedDocumentHandler : string

Field Value

Attributes

Remarks

Intent category to filter for activities that can handle document intents.

Indicates that an approved activity can receive intents Intent.ACTION_SEND and/or Intent.ACTION_SEND_MULTIPLE. The activity's package must be allowlisted by the system file manager. The activity will appear in the system file manager as a menu item when acceptable files are selected. The activity must also define an `android:label` to be accepted as a menu item.

Optionally, the activity can declare the intent to be shown as an action button instead of a menu item in `AndroidManifest.xml`. It must include an `android:icon` and a meta-data entry `android.approvedtarget.as_button` with a value of `true`.

<activity android:name=".ApprovedDocumentHandlerActivity"
        ...
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.provider.category.APPROVED_DOCUMENT_HANDLER" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>

Android reference for android.provider.DocumentsContract.CATEGORY_APPROVED_DOCUMENT_HANDLER.

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