다음을 통해 공유


TelephonyCallback.IActiveDataSubscriptionIdListener.OnActiveDataSubscriptionIdChanged Method

Definition

Callback invoked when active data subscription ID changes.

[Android.Runtime.Register("onActiveDataSubscriptionIdChanged", "(I)V", "GetOnActiveDataSubscriptionIdChanged_IHandler:Android.Telephony.TelephonyCallback/IActiveDataSubscriptionIdListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=31)]
public void OnActiveDataSubscriptionIdChanged (int subId);
[<Android.Runtime.Register("onActiveDataSubscriptionIdChanged", "(I)V", "GetOnActiveDataSubscriptionIdChanged_IHandler:Android.Telephony.TelephonyCallback/IActiveDataSubscriptionIdListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=31)>]
abstract member OnActiveDataSubscriptionIdChanged : int -> unit

Parameters

subId
Int32

current subscription used to setup Cellular Internet data. The data is only active on the subscription at a time, even it is multi-SIM mode. For example, it could be the current active opportunistic subscription in use, or the subscription user selected as default data subscription in DSDS mode.

        The calling app should have carrier privileges
        (see <code data-dev-comment-type="c">TelephonyManager#hasCarrierPrivileges</code>) if it does not have the
        <code data-dev-comment-type="c">android.Manifest.permission#READ_PHONE_STATE</code>.
Attributes

Remarks

Callback invoked when active data subscription ID changes. Note, this callback triggers regardless of registered subscription.

Java documentation for android.telephony.TelephonyCallback.ActiveDataSubscriptionIdListener.onActiveDataSubscriptionIdChanged(int).

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