共用方式為


ImsRcsManager.GetRegistrationState(IExecutor, IConsumer) 方法

定義

取得IMS服務的註冊狀態。

[Android.Runtime.Register("getRegistrationState", "(Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "GetGetRegistrationState_Ljava_util_concurrent_Executor_Ljava_util_function_Consumer_Handler", ApiSince=31)]
[Android.Runtime.RequiresPermission("android.permission.READ_PRECISE_PHONE_STATE")]
public virtual void GetRegistrationState (Java.Util.Concurrent.IExecutor executor, Java.Util.Functions.IConsumer stateCallback);
[<Android.Runtime.Register("getRegistrationState", "(Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "GetGetRegistrationState_Ljava_util_concurrent_Executor_Ljava_util_function_Consumer_Handler", ApiSince=31)>]
[<Android.Runtime.RequiresPermission("android.permission.READ_PRECISE_PHONE_STATE")>]
abstract member GetRegistrationState : Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit
override this.GetRegistrationState : Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit

參數

executor
IExecutor

Executor,將用來呼叫IMS註冊狀態回呼。

stateCallback
IConsumer

在提供的 Executor 上呼叫的回呼,其中包含 IMS 服務的註冊狀態,這會是下列其中一項: RegistrationManager#REGISTRATION_STATE_NOT_REGISTEREDRegistrationManager#REGISTRATION_STATE_REGISTERINGRegistrationManager#REGISTRATION_STATE_REGISTERED

屬性

備註

取得IMS服務的註冊狀態。

需要許可權: android.Manifest.permission#READ_PRECISE_PHONE_STATE READ_PRECISE_PHONE_STATE 或呼叫的應用程式具有電信業者許可權(請參閱 android.telephony.TelephonyManager#hasCarrierPrivileges)。

android.telephony.ims.ImsRcsManager.getRegistrationState(java.util.concurrent.Executor, java.util.function.Consumer<java.lang.Integer>)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於