語言

AppFunctionUriGrant 類別

定義

Uri 存取權限應授予呼叫 AppFunctionManager#executeAppFunction者,提供給 ExecuteAppFunctionResponse。

[Android.Runtime.Register("android/app/appfunctions/AppFunctionUriGrant", ApiSince=37, DoNotGenerateAcw=true)]
public sealed class AppFunctionUriGrant : Java.Lang.Object, Android.OS.IParcelable, IDisposable
[<Android.Runtime.Register("android/app/appfunctions/AppFunctionUriGrant", ApiSince=37, DoNotGenerateAcw=true)>]
type AppFunctionUriGrant = class
    inherit Object
    interface IParcelable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
繼承
AppFunctionUriGrant
屬性
實作

備註

Uri 的存取權限需授予 AppFunctionManager.executeAppFunction 的呼叫者,該權限提供給 ExecuteAppFunctionResponse。

此類別封裝一個 URI,並包含特定的存取模式旗標(例如 FLAG_GRANT_READ_URI_PERMISSION),定義該 URI 應授予的存取類型。

當 AppFunction 實作回傳包含 URI 的 ExecuteAppFunctionResponse 時,該 URI 必須置於 ExecuteAppFunctionResponse.getResultDocument 或 ExecuteAppFunctionResponse.getExtras。 同時,必須在 ExecuteAppFunctionResponse.getUriGrants 中新增一個對應的 AppFunctionUriGrant,詳細說明預期權限。 這確保呼叫者獲得回傳 Uri 所需的存取權限。

要成功,擁有 Uri 的內容提供者必須在其 manifest 中設定 grantUriPermissions 屬性,或包含在 <grant-uri-permissions> 標籤中。

這些授權通常會持續,直到裝置重啟,直到FLAG_GRANT_PERSISTABLE_URI_PERMISSION設定完成,接收端呼叫 ContentResolver.takePersistableUriPermission(Uri, int)。 Uri 擁有者可在重啟後考慮清除與這些 URI 相關的資料。

Android 參考資料。android.app.appfunctions.AppFunctionUriGrant

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

建構函式

名稱 Description
AppFunctionUriGrant(Uri, Int32)

構造一個 AppFunctionUriGrant

屬性

名稱 Description
Class

回傳此 Object的執行時類別。

(繼承來源 Object)
Creator

Uri 存取權限應授予呼叫 AppFunctionManager#executeAppFunction者,提供給 ExecuteAppFunctionResponse。

Handle

底層 Android 實例的帳號。

(繼承來源 Object)
JniIdentityHashCode

取得由互通執行時指派給此 Java 對等端的身份雜湊碼。

(繼承來源 Object)
JniManagedPeerState

Uri 存取權限應授予呼叫 AppFunctionManager#executeAppFunction者,提供給 ExecuteAppFunctionResponse。

(繼承來源 JavaObject)
JniPeerMembers

Uri 存取權限應授予呼叫 AppFunctionManager#executeAppFunction者,提供給 ExecuteAppFunctionResponse。

ModeFlags

回傳存取模式旗標。

PeerReference

取得這個 Java 節點的 JNI 物件參考。

(繼承來源 Object)
ThresholdClass

此 API 支援 Mono for Android 基礎架構,並非直接從你的程式碼中使用。

(繼承來源 Object)
ThresholdType

此 API 支援 Mono for Android 基礎架構,並非直接從你的程式碼中使用。

(繼承來源 Object)
Uri

退還 Uri 將被授予。

方法

名稱 Description
Clone()

建立並回傳此物件的副本。

(繼承來源 Object)
Construct(JniObjectReference, JniObjectReferenceOptions)

Uri 存取權限應授予呼叫 AppFunctionManager#executeAppFunction者,提供給 ExecuteAppFunctionResponse。

(繼承來源 JavaObject)
DescribeContents()

描述此 Parcelable 實例的分組表示中包含的特殊物件種類。

Dispose()

釋放該 Java 節點所持有的資源。

(繼承來源 Object)
Dispose(Boolean)

釋放該 Java 節點所持有的資源。

(繼承來源 Object)
DisposeUnlessReferenced()

Uri 存取權限應授予呼叫 AppFunctionManager#executeAppFunction者,提供給 ExecuteAppFunctionResponse。

(繼承來源 JavaObject)
Equals(Object)

Uri 存取權限應授予呼叫 AppFunctionManager#executeAppFunction者,提供給 ExecuteAppFunctionResponse。

(繼承來源 JavaObject)
Equals(Object)

表示是否有其他物體「等同」於此物。

(繼承來源 Object)
GetHashCode()

回傳物件的雜湊碼值。

(繼承來源 Object)
JavaFinalize()
已淘汰.

當垃圾回收判定該物件不再有相關參考時,由垃圾回收器呼叫。

(繼承來源 Object)
Notify()

喚醒一個正在該物件監視器上等待的執行緒。

(繼承來源 Object)
NotifyAll()

喚醒所有等待該物件監視器的執行緒。

(繼承來源 Object)
SetHandle(IntPtr, JniHandleOwnership)

設定 Handle 屬性。

(繼承來源 Object)
SetPeerReference(JniObjectReference, JniObjectReferenceOptions)

Uri 存取權限應授予呼叫 AppFunctionManager#executeAppFunction者,提供給 ExecuteAppFunctionResponse。

(繼承來源 JavaObject)
ToArray<T>()

從這個 Java 陣列包裝器建立一個受管理陣列。

(繼承來源 Object)
ToString()

回傳物件的字串表示。

(繼承來源 Object)
UnregisterFromRuntime()

將此 Java 節點從互通執行時中取消註冊。

(繼承來源 Object)
Wait()

導致目前執行緒等待被喚醒,通常是透過 <em>通知</><em 或 em>中斷</em> 來喚醒。

(繼承來源 Object)
Wait(Int64, Int32)

會讓目前執行緒等待喚醒,通常是透過 <em>通知</><em 或 em>中斷</em>,或是經過一定的真實時間。

(繼承來源 Object)
Wait(Int64)

會讓目前執行緒等待喚醒,通常是透過 <em>通知</><em 或 em>中斷</em>,或是經過一定的真實時間。

(繼承來源 Object)
WriteToParcel(Parcel, ParcelableWriteFlags)

把這個物體壓扁成一個包裹。

明確介面實作

名稱 Description
IJavaPeerable.Disposed()

Uri 存取權限應授予呼叫 AppFunctionManager#executeAppFunction者,提供給 ExecuteAppFunctionResponse。

(繼承來源 JavaObject)
IJavaPeerable.Finalized()

Uri 存取權限應授予呼叫 AppFunctionManager#executeAppFunction者,提供給 ExecuteAppFunctionResponse。

(繼承來源 JavaObject)
IJavaPeerable.JniObjectReferenceControlBlock

Uri 存取權限應授予呼叫 AppFunctionManager#executeAppFunction者,提供給 ExecuteAppFunctionResponse。

(繼承來源 JavaObject)
IJavaPeerable.SetJniIdentityHashCode(Int32)

Uri 存取權限應授予呼叫 AppFunctionManager#executeAppFunction者,提供給 ExecuteAppFunctionResponse。

(繼承來源 JavaObject)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates)

Uri 存取權限應授予呼叫 AppFunctionManager#executeAppFunction者,提供給 ExecuteAppFunctionResponse。

(繼承來源 JavaObject)
IJavaPeerable.SetPeerReference(JniObjectReference)

Uri 存取權限應授予呼叫 AppFunctionManager#executeAppFunction者,提供給 ExecuteAppFunctionResponse。

(繼承來源 JavaObject)
IJavaPeerable.UnregisterFromRuntime()

Uri 存取權限應授予呼叫 AppFunctionManager#executeAppFunction者,提供給 ExecuteAppFunctionResponse。

擴充方法

名稱 Description
GetJniTypeName(IJavaPeerable)

取得實例 self類型的 JNI 名稱。

JavaAs<TResult>(IJavaPeerable)

試著強制self輸入 TResult,檢查 強制在 Java 端是否有效。

JavaCast<TResult>(IJavaObject)

執行 Android 執行時檢查型別轉換。

JavaCast<TResult>(IJavaObject)

Uri 存取權限應授予呼叫 AppFunctionManager#executeAppFunction者,提供給 ExecuteAppFunctionResponse。

TryJavaCast<TResult>(IJavaPeerable, TResult)

試著強制self輸入 TResult,檢查 強制在 Java 端是否有效。

適用於