語言

IAppFunctionRegistration 介面

定義

結果 AppFunctionManager#registerAppFunction

[Android.Runtime.Register("android/app/appfunctions/AppFunctionRegistration", "", "Android.App.AppFunctions.IAppFunctionRegistrationInvoker", ApiSince=37)]
public interface IAppFunctionRegistration : Android.Runtime.IJavaObject, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/app/appfunctions/AppFunctionRegistration", "", "Android.App.AppFunctions.IAppFunctionRegistrationInvoker", ApiSince=37)>]
type IAppFunctionRegistration = interface
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
屬性
實作

備註

AppFunctionManager.registerAppFunction 的結果。

呼叫者應保留對此物件的參考,並在應用程式函式不再相關時(例如 Activity.onStop() 或在 Service.stopForeground(boolean)之前)呼叫 unregister()。

未能取消註冊應用程式函式可能導致記憶體洩漏及意外行為,因為系統會持續保留對 AppFunction 物件的參考。

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

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

屬性

名稱 Description
Handle

取得底層 Android 物件的 JNI 值。

(繼承來源 IJavaObject)
JniIdentityHashCode

回傳包裹實例的 java.lang.System.identityHashCode() 值。

(繼承來源 IJavaPeerable)
JniManagedPeerState

管理貴族的狀況。

(繼承來源 IJavaPeerable)
JniObjectReferenceControlBlock

結果 AppFunctionManager#registerAppFunction

(繼承來源 IJavaPeerable)
JniPeerMembers

成員存取與召喚支援。

(繼承來源 IJavaPeerable)
PeerReference

回傳JniObjectReference包裹後的 Java 物件實例。

(繼承來源 IJavaPeerable)

方法

名稱 Description
Disposed()

當實例被處理後才被召喚。

(繼承來源 IJavaPeerable)
DisposeUnlessReferenced()

如果沒有未解決的參考資料,則 Dispose()呼叫;否則,則不做任何事。

(繼承來源 IJavaPeerable)
Finalized()

當實例完成後才會被通知。

(繼承來源 IJavaPeerable)
SetJniIdentityHashCode(Int32)

將回傳的值設為 JniIdentityHashCode

(繼承來源 IJavaPeerable)
SetJniManagedPeerState(JniManagedPeerStates)

結果 AppFunctionManager#registerAppFunction

(繼承來源 IJavaPeerable)
SetPeerReference(JniObjectReference)

將回傳的值設為 PeerReference

(繼承來源 IJavaPeerable)
Unregister()

取消註冊先前註冊的 AppFunctionManager#registerAppFunction應用程式功能。

UnregisterFromRuntime()

取消註冊此實例,讓執行時不會在未來 Java.Interop.JniRuntime+JniValueManager.PeekValue 的呼叫中回傳該實例。

(繼承來源 IJavaPeerable)

擴充方法

名稱 Description
GetJniTypeName(IJavaPeerable)

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

JavaAs<TResult>(IJavaPeerable)

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

JavaCast<TResult>(IJavaObject)

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

JavaCast<TResult>(IJavaObject)

結果 AppFunctionManager#registerAppFunction

TryJavaCast<TResult>(IJavaPeerable, TResult)

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

適用於