Condividi tramite


SubscriptionManager.IsActiveSubscriptionId(Int32) Method

Definition

Checks if the supplied subscription ID corresponds to a subscription which is actively in use on the device.

[Android.Runtime.Register("isActiveSubscriptionId", "(I)Z", "GetIsActiveSubscriptionId_IHandler", ApiSince=29)]
[Android.Runtime.RequiresPermission("android.permission.READ_PHONE_STATE")]
public virtual bool IsActiveSubscriptionId (int subscriptionId);
[<Android.Runtime.Register("isActiveSubscriptionId", "(I)Z", "GetIsActiveSubscriptionId_IHandler", ApiSince=29)>]
[<Android.Runtime.RequiresPermission("android.permission.READ_PHONE_STATE")>]
abstract member IsActiveSubscriptionId : int -> bool
override this.IsActiveSubscriptionId : int -> bool

Parameters

subscriptionId
Int32

the subscription ID.

Returns

true if the supplied subscription ID corresponds to an active subscription; false if it does not correspond to an active subscription; or throw a SecurityException if the caller hasn't got the right permission.

Attributes

Remarks

Checks if the supplied subscription ID corresponds to a subscription which is actively in use on the device. An active subscription ID is a valid and usable subscription ID.

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