Android APIs
public static class

PhoneAccount.Builder

extends Object
java.lang.Object
   ↳ android.telecom.PhoneAccount.Builder

Class Overview

Helper class for creating a PhoneAccount.

Summary

Public Constructors
PhoneAccount.Builder(PhoneAccountHandle accountHandle, CharSequence label)
Creates a builder with the specified PhoneAccountHandle and label.
PhoneAccount.Builder(PhoneAccount phoneAccount)
Creates an instance of the PhoneAccount.Builder from an existing PhoneAccount.
Public Methods
PhoneAccount.Builder addSupportedUriScheme(String uriScheme)
Specifies an additional URI scheme supported by the PhoneAccount.
PhoneAccount build()
Creates an instance of a PhoneAccount based on the current builder settings.
PhoneAccount.Builder setAddress(Uri value)
Sets the address.
PhoneAccount.Builder setCapabilities(int value)
Sets the capabilities.
PhoneAccount.Builder setHighlightColor(int value)
Sets the highlight color.
PhoneAccount.Builder setIcon(Icon icon)
Sets the icon.
PhoneAccount.Builder setShortDescription(CharSequence value)
Sets the short description.
PhoneAccount.Builder setSubscriptionAddress(Uri value)
Sets the subscription address.
PhoneAccount.Builder setSupportedUriSchemes(List<String> uriSchemes)
Specifies the URI schemes supported by the PhoneAccount.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public PhoneAccount.Builder (PhoneAccountHandle accountHandle, CharSequence label)

Added in API level 23

Creates a builder with the specified PhoneAccountHandle and label.

public PhoneAccount.Builder (PhoneAccount phoneAccount)

Added in API level 23

Creates an instance of the PhoneAccount.Builder from an existing PhoneAccount.

Parameters
phoneAccount The PhoneAccount used to initialize the builder.

Public Methods

public PhoneAccount.Builder addSupportedUriScheme (String uriScheme)

Added in API level 23

Specifies an additional URI scheme supported by the PhoneAccount.

Parameters
uriScheme The URI scheme.
Returns
  • The builder.

public PhoneAccount build ()

Added in API level 23

Creates an instance of a PhoneAccount based on the current builder settings.

Returns

public PhoneAccount.Builder setAddress (Uri value)

Added in API level 23

Sets the address. See getAddress().

Parameters
value The address of the phone account.
Returns
  • The builder.

public PhoneAccount.Builder setCapabilities (int value)

Added in API level 23

Sets the capabilities. See getCapabilities().

Parameters
value The capabilities to set.
Returns
  • The builder.

public PhoneAccount.Builder setHighlightColor (int value)

Added in API level 23

Sets the highlight color. See getHighlightColor().

Parameters
value The highlight color.
Returns
  • The builder.

public PhoneAccount.Builder setIcon (Icon icon)

Added in API level 23

Sets the icon. See getIcon().

Parameters
icon The icon to set.

public PhoneAccount.Builder setShortDescription (CharSequence value)

Added in API level 23

Sets the short description. See getShortDescription().

Parameters
value The short description.
Returns
  • The builder.

public PhoneAccount.Builder setSubscriptionAddress (Uri value)

Added in API level 23

Sets the subscription address. See getSubscriptionAddress().

Parameters
value The subscription address.
Returns
  • The builder.

public PhoneAccount.Builder setSupportedUriSchemes (List<String> uriSchemes)

Added in API level 23

Specifies the URI schemes supported by the PhoneAccount.

Parameters
uriSchemes The URI schemes.
Returns
  • The builder.