Compartilhar via


TelephonyCallback.IPreciseDataConnectionStateListener.OnPreciseDataConnectionStateChanged Method

Definition

Callback providing update about the default/internet data connection on the registered subscription.

[Android.Runtime.Register("onPreciseDataConnectionStateChanged", "(Landroid/telephony/PreciseDataConnectionState;)V", "GetOnPreciseDataConnectionStateChanged_Landroid_telephony_PreciseDataConnectionState_Handler:Android.Telephony.TelephonyCallback/IPreciseDataConnectionStateListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=31)]
public void OnPreciseDataConnectionStateChanged (Android.Telephony.PreciseDataConnectionState dataConnectionState);
[<Android.Runtime.Register("onPreciseDataConnectionStateChanged", "(Landroid/telephony/PreciseDataConnectionState;)V", "GetOnPreciseDataConnectionStateChanged_Landroid_telephony_PreciseDataConnectionState_Handler:Android.Telephony.TelephonyCallback/IPreciseDataConnectionStateListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=31)>]
abstract member OnPreciseDataConnectionStateChanged : Android.Telephony.PreciseDataConnectionState -> unit

Parameters

dataConnectionState
PreciseDataConnectionState

PreciseDataConnectionState

Attributes

Remarks

Callback providing update about the default/internet data connection on the registered subscription.

Note, the registration subscription ID comes from TelephonyManager object which registers TelephonyCallback by TelephonyManager#registerTelephonyCallback(Executor, TelephonyCallback). If this TelephonyManager object was created with TelephonyManager#createForSubscriptionId(int), then the callback applies to the subscription ID. Otherwise, this callback applies to SubscriptionManager#getDefaultSubscriptionId().

The calling app should have carrier privileges (see TelephonyManager#hasCarrierPrivileges) if it does not have the android.Manifest.permission#READ_PRECISE_PHONE_STATE.

Java documentation for android.telephony.TelephonyCallback.PreciseDataConnectionStateListener.onPreciseDataConnectionStateChanged(android.telephony.PreciseDataConnectionState).

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