Share via


SubscriptionManager.GetSubscriptionIds(Int32) Method

Definition

Get an array of subscription ids for the specified logical SIM slot Index.

[Android.Runtime.Register("getSubscriptionIds", "(I)[I", "GetGetSubscriptionIds_IHandler", ApiSince=29)]
public virtual int[]? GetSubscriptionIds (int slotIndex);
[<Android.Runtime.Register("getSubscriptionIds", "(I)[I", "GetGetSubscriptionIds_IHandler", ApiSince=29)>]
abstract member GetSubscriptionIds : int -> int[]
override this.GetSubscriptionIds : int -> int[]

Parameters

slotIndex
Int32

The logical SIM slot index.

Returns

Int32[]

Subscription id of the active subscription on the specified logical SIM slot index. If SIM is absent on the slot, a single element array of #INVALID_SUBSCRIPTION_ID will be returned. null if the provided slotIndex is not valid.

Attributes

Remarks

Get an array of subscription ids for the specified logical SIM slot Index. The maximum size of the array is 1. This API was mistakenly designed to return multiple subscription ids, which is not possible in the current Android telephony architecture.

This member is deprecated. Use #getSubscriptionId(int) instead.

Java documentation for android.telephony.SubscriptionManager.getSubscriptionIds(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