Partager via


SubscriptionManager.GetActiveSubscriptionInfoForSimSlotIndex(Int32) Method

Definition

Get the active SubscriptionInfo associated with the slotIndex

[Android.Runtime.Register("getActiveSubscriptionInfoForSimSlotIndex", "(I)Landroid/telephony/SubscriptionInfo;", "GetGetActiveSubscriptionInfoForSimSlotIndex_IHandler", ApiSince=22)]
[Android.Runtime.RequiresPermission("android.permission.READ_PHONE_STATE")]
public virtual Android.Telephony.SubscriptionInfo? GetActiveSubscriptionInfoForSimSlotIndex (int slotIndex);
[<Android.Runtime.Register("getActiveSubscriptionInfoForSimSlotIndex", "(I)Landroid/telephony/SubscriptionInfo;", "GetGetActiveSubscriptionInfoForSimSlotIndex_IHandler", ApiSince=22)>]
[<Android.Runtime.RequiresPermission("android.permission.READ_PHONE_STATE")>]
abstract member GetActiveSubscriptionInfoForSimSlotIndex : int -> Android.Telephony.SubscriptionInfo
override this.GetActiveSubscriptionInfoForSimSlotIndex : int -> Android.Telephony.SubscriptionInfo

Parameters

slotIndex
Int32

the slot which the subscription is inserted

Returns

SubscriptionInfo, maybe null if its not active

Attributes

Remarks

Get the active SubscriptionInfo associated with the slotIndex

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.getActiveSubscriptionInfoForSimSlotIndex(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