Partager via


BaseInputConnection.InterfaceConsts.InputContentGrantReadUriPermission Field

Definition

Caution

This constant will be removed in the future version. Use Android.Views.InputMethods.InputContentFlags enum directly instead of this field.

When this flag is used, the editor will be able to request read access to the content URI contained in the InputContentInfo object.

[Android.Runtime.Register("INPUT_CONTENT_GRANT_READ_URI_PERMISSION", ApiSince=25)]
[System.Obsolete("This constant will be removed in the future version. Use Android.Views.InputMethods.InputContentFlags enum directly instead of this field.", true)]
public const Android.Views.InputMethods.InputContentFlags InputContentGrantReadUriPermission = 1;
[<Android.Runtime.Register("INPUT_CONTENT_GRANT_READ_URI_PERMISSION", ApiSince=25)>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.Views.InputMethods.InputContentFlags enum directly instead of this field.", true)>]
val mutable InputContentGrantReadUriPermission : Android.Views.InputMethods.InputContentFlags

Field Value

Value = 1
Attributes

Remarks

When this flag is used, the editor will be able to request read access to the content URI contained in the InputContentInfo object.

Make sure that the content provider owning the Uri sets the android.R.styleable#AndroidManifestProvider_grantUriPermissions grantUriPermissions attribute in its manifest or included the android.R.styleable#AndroidManifestGrantUriPermission &lt;grant-uri-permissions&gt; tag. Otherwise InputContentInfo#requestPermission() can fail.

Although calling this API is allowed only for the IME that is currently selected, the client is able to request a temporary read-only access even after the current IME is switched to any other IME as long as the client keeps InputContentInfo object.

Java documentation for android.view.inputmethod.InputConnection.INPUT_CONTENT_GRANT_READ_URI_PERMISSION.

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