Udostępnij za pośrednictwem


PhoneStateListener.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", ApiSince=30)]
[Android.Runtime.RequiresPermission("android.permission.READ_PRECISE_PHONE_STATE")]
public virtual void OnPreciseDataConnectionStateChanged (Android.Telephony.PreciseDataConnectionState dataConnectionState);
[<Android.Runtime.Register("onPreciseDataConnectionStateChanged", "(Landroid/telephony/PreciseDataConnectionState;)V", "GetOnPreciseDataConnectionStateChanged_Landroid_telephony_PreciseDataConnectionState_Handler", ApiSince=30)>]
[<Android.Runtime.RequiresPermission("android.permission.READ_PRECISE_PHONE_STATE")>]
abstract member OnPreciseDataConnectionStateChanged : Android.Telephony.PreciseDataConnectionState -> unit
override this.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 subId comes from TelephonyManager object which registers PhoneStateListener by TelephonyManager#listen(PhoneStateListener, int). If this TelephonyManager object was created with TelephonyManager#createForSubscriptionId(int), then the callback applies to the subId. Otherwise, this callback applies to SubscriptionManager#getDefaultSubscriptionId().

Requires permission android.Manifest.permission#READ_PRECISE_PHONE_STATE or the calling app has carrier privileges (see TelephonyManager#hasCarrierPrivileges).

This member is deprecated. Use TelephonyCallback.PreciseDataConnectionStateListener instead.

Java documentation for android.telephony.PhoneStateListener.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