Share via


TelephonyManager.PhoneAccountHandle Property

Definition

Determines the PhoneAccountHandle associated with this TelephonyManager.

public virtual Android.Telecom.PhoneAccountHandle? PhoneAccountHandle { [Android.Runtime.Register("getPhoneAccountHandle", "()Landroid/telecom/PhoneAccountHandle;", "GetGetPhoneAccountHandleHandler", ApiSince=31)] [Android.Runtime.RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE")] get; }
[<get: Android.Runtime.Register("getPhoneAccountHandle", "()Landroid/telecom/PhoneAccountHandle;", "GetGetPhoneAccountHandleHandler", ApiSince=31)>]
[<get: Android.Runtime.RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE")>]
member this.PhoneAccountHandle : Android.Telecom.PhoneAccountHandle

Property Value

The PhoneAccountHandle associated with the TelphonyManager, or null if there is no associated PhoneAccountHandle; this can happen if the subscription is data-only or an opportunistic subscription.

Attributes

Remarks

Determines the PhoneAccountHandle associated with this TelephonyManager.

If this object has been created with #createForSubscriptionId, applies to the given subId. Otherwise, applies to SubscriptionManager#getDefaultSubscriptionId()

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

Java documentation for android.telephony.TelephonyManager.getPhoneAccountHandle().

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