TelecomManager.RegisterPhoneAccount(PhoneAccount) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Register a PhoneAccount
for use by the system that will be stored in Device Encrypted
storage.
[Android.Runtime.Register("registerPhoneAccount", "(Landroid/telecom/PhoneAccount;)V", "GetRegisterPhoneAccount_Landroid_telecom_PhoneAccount_Handler", ApiSince=23)]
public virtual void RegisterPhoneAccount (Android.Telecom.PhoneAccount? account);
[<Android.Runtime.Register("registerPhoneAccount", "(Landroid/telecom/PhoneAccount;)V", "GetRegisterPhoneAccount_Landroid_telecom_PhoneAccount_Handler", ApiSince=23)>]
abstract member RegisterPhoneAccount : Android.Telecom.PhoneAccount -> unit
override this.RegisterPhoneAccount : Android.Telecom.PhoneAccount -> unit
Parameters
- account
- PhoneAccount
The complete PhoneAccount
.
- Attributes
Remarks
Register a PhoneAccount
for use by the system that will be stored in Device Encrypted storage. When registering PhoneAccount
s, existing registrations will be overwritten if the PhoneAccountHandle
matches that of a PhoneAccount
which is already registered. Once registered, the PhoneAccount
is listed to the user as an option when placing calls. The user may still need to enable the PhoneAccount
within the phone app settings before the account is usable.
Note: Each package is limited to 10 PhoneAccount
registrations.
A SecurityException
will be thrown if an app tries to register a PhoneAccountHandle
where the package name specified within PhoneAccountHandle#getComponentName()
does not match the package name of the app.
A IllegalArgumentException
will be thrown if an app tries to register a PhoneAccount
when the upper bound limit, 10, has already been reached.
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.