PreciseDataConnectionStateListener
interface PreciseDataConnectionStateListener
android.telephony.TelephonyCallback.PreciseDataConnectionStateListener |
Interface for precise data connection state listener.
Summary
Public methods | |
---|---|
abstract Unit |
onPreciseDataConnectionStateChanged(dataConnectionState: PreciseDataConnectionState) Callback providing update about the default/internet data connection on the registered subscription. |
Public methods
onPreciseDataConnectionStateChanged
abstract fun onPreciseDataConnectionStateChanged(dataConnectionState: PreciseDataConnectionState): Unit
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
.
Requires android.Manifest.permission#READ_PRECISE_PHONE_STATE
Parameters | |
---|---|
dataConnectionState |
PreciseDataConnectionState: PreciseDataConnectionState This value cannot be null . |