Sdílet prostřednictvím


TelephonyManager.GetSubscriptionId(PhoneAccountHandle) Method

Definition

Returns the subscription ID for the given phone account handle.

[Android.Runtime.Register("getSubscriptionId", "(Landroid/telecom/PhoneAccountHandle;)I", "GetGetSubscriptionId_Landroid_telecom_PhoneAccountHandle_Handler", ApiSince=30)]
[Android.Runtime.RequiresPermission("android.permission.READ_PHONE_STATE")]
public virtual int GetSubscriptionId (Android.Telecom.PhoneAccountHandle phoneAccountHandle);
[<Android.Runtime.Register("getSubscriptionId", "(Landroid/telecom/PhoneAccountHandle;)I", "GetGetSubscriptionId_Landroid_telecom_PhoneAccountHandle_Handler", ApiSince=30)>]
[<Android.Runtime.RequiresPermission("android.permission.READ_PHONE_STATE")>]
abstract member GetSubscriptionId : Android.Telecom.PhoneAccountHandle -> int
override this.GetSubscriptionId : Android.Telecom.PhoneAccountHandle -> int

Parameters

phoneAccountHandle
PhoneAccountHandle

the phone account handle for outgoing calls

Returns

subscription ID for the given phone account handle; or SubscriptionManager#INVALID_SUBSCRIPTION_ID if not available; or throw a SecurityException if the caller doesn't have the permission.

Attributes

Remarks

Returns the subscription ID for the given phone account handle.

Java documentation for android.telephony.TelephonyManager.getSubscriptionId(android.telecom.PhoneAccountHandle).

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