語言

InputConnectionWrapper.InterfaceConsts.InputContentGrantReadUriPermission 欄位

定義

警告

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

使用此旗標時,編輯器將能請求對物件中內容 InputContentInfo URI 的讀取權限。

[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

欄位值

Value = 1
屬性

備註

使用此旗標時,編輯器將能請求對物件中內容 InputContentInfo URI 的讀取權限。

確保擁有 Uri 的內容提供者在其清單中設定了該 android.R.styleable#AndroidManifestProvider_grantUriPermissions grantUriPermissions 屬性或包含 android.R.styleable#AndroidManifestGrantUriPermission &lt;grant-uri-permissions&gt; 標籤。 否則 InputContentInfo#requestPermission() 可能會失敗。

雖然呼叫此 API 僅允許對目前選擇的 IME 進行,但只要客戶端保留 InputContentInfo 物件,客戶端仍可申請暫時只讀存取,即使目前 IME 已切換到任一 IME。

Java 文件 android.view.inputmethod.InputConnection.INPUT_CONTENT_GRANT_READ_URI_PERMISSION。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於