Aracılığıyla paylaş


TelecomManager.RegisterPhoneAccount(PhoneAccount) Method

Definition

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 PhoneAccounts, 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.

Java documentation for android.telecom.TelecomManager.registerPhoneAccount(android.telecom.PhoneAccount).

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