次の方法で共有


SubscriptionManager.ActiveSubscriptionInfoList Property

Definition

Get the SubscriptionInfo(s) of the currently active SIM(s).

public virtual System.Collections.Generic.IList<Android.Telephony.SubscriptionInfo>? ActiveSubscriptionInfoList { [Android.Runtime.Register("getActiveSubscriptionInfoList", "()Ljava/util/List;", "GetGetActiveSubscriptionInfoListHandler", ApiSince=22)] [Android.Runtime.RequiresPermission("android.permission.READ_PHONE_STATE")] get; }
[<get: Android.Runtime.Register("getActiveSubscriptionInfoList", "()Ljava/util/List;", "GetGetActiveSubscriptionInfoListHandler", ApiSince=22)>]
[<get: Android.Runtime.RequiresPermission("android.permission.READ_PHONE_STATE")>]
member this.ActiveSubscriptionInfoList : System.Collections.Generic.IList<Android.Telephony.SubscriptionInfo>

Property Value

a list of the active SubscriptionInfo that is visible to the caller. If an empty list or null is returned, then there are no active subscriptions that are visible to the caller. If the number of active subscriptions available to any caller changes, then this change will be indicated by OnSubscriptionsChangedListener#onSubscriptionsChanged.

Attributes

Remarks

Get the SubscriptionInfo(s) of the currently active SIM(s).

Returned records will be sorted by SubscriptionInfo#getSimSlotIndex then by SubscriptionInfo#getSubscriptionId. Beginning with Android SDK 35, this method will never return null.

Requires Permission: android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE or that the calling app has carrier privileges (see TelephonyManager#hasCarrierPrivileges).

Java documentation for android.telephony.SubscriptionManager.getActiveSubscriptionInfoList().

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