TelephoneKeypadTemplate


@ExperimentalCarApi
@CarProtocol
public class TelephoneKeypadTemplate implements Template


A template that allows a user to dial a phone number which includes a keypad, a primary button, and a place for the user to see their dialed number.

Summary

Nested types

A builder for TelephoneKeypadTemplate.

An interface for clients to receive events about the phone number changing.

Constants

static final int

The `8` key in the keypad.

static final int

The `5` key in the keypad.

static final int

The `4` key in the keypad.

static final int

The `9` key in the keypad.

static final int

The `1` key in the keypad.

static final int

The `#` key in the keypad.

static final int

The `7` key in the keypad.

static final int

The `6` key in the keypad.

static final int

The `*` key in the keypad.

static final int

The `3` key in the keypad.

static final int

The `2` key in the keypad.

static final int

The `0` key in the keypad.

Public constructors

Default empty constructor for the serializer.

Public methods

boolean
@Nullable Header

Returns the Header to show in this template.

@NonNull Map<IntegerCarText>

Returns the mapping of key -> text for the keypad button's secondary text.

@Nullable String

Gets the phone number to show in the "dialed number" field which can be edited before calling.

@Nullable InputCallbackDelegate

Returns the delegate that is used to fire dialed number change events back to the client app.

@Nullable Action

Returns the primary action button.

@Nullable TelephoneKeypadCallbackDelegate

Returns the delegate that is used to fire key events back to the client app.

int
@NonNull String

Constants

KEY_EIGHT

Added in 1.8.0-beta01
public static final int KEY_EIGHT = 8

The `8` key in the keypad.

KEY_FIVE

Added in 1.8.0-beta01
public static final int KEY_FIVE = 5

The `5` key in the keypad.

KEY_FOUR

Added in 1.8.0-beta01
public static final int KEY_FOUR = 4

The `4` key in the keypad.

KEY_NINE

Added in 1.8.0-beta01
public static final int KEY_NINE = 9

The `9` key in the keypad.

KEY_ONE

Added in 1.8.0-beta01
public static final int KEY_ONE = 1

The `1` key in the keypad.

KEY_POUND

Added in 1.8.0-beta01
public static final int KEY_POUND = 11

The `#` key in the keypad.

KEY_SEVEN

Added in 1.8.0-beta01
public static final int KEY_SEVEN = 7

The `7` key in the keypad.

KEY_SIX

Added in 1.8.0-beta01
public static final int KEY_SIX = 6

The `6` key in the keypad.

KEY_STAR

Added in 1.8.0-beta01
public static final int KEY_STAR = 10

The `*` key in the keypad.

KEY_THREE

Added in 1.8.0-beta01
public static final int KEY_THREE = 3

The `3` key in the keypad.

KEY_TWO

Added in 1.8.0-beta01
public static final int KEY_TWO = 2

The `2` key in the keypad.

KEY_ZERO

Added in 1.8.0-beta01
public static final int KEY_ZERO = 0

The `0` key in the keypad.

Public constructors

TelephoneKeypadTemplate

Added in 1.8.0-beta01
@VisibleForTesting
public TelephoneKeypadTemplate()

Default empty constructor for the serializer.

Public methods

equals

public boolean equals(@Nullable Object other)

getHeader

Added in 1.8.0-beta01
public @Nullable Header getHeader()

Returns the Header to show in this template.

getKeySecondaryTexts

Added in 1.8.0-beta01
public @NonNull Map<IntegerCarTextgetKeySecondaryTexts()

Returns the mapping of key -> text for the keypad button's secondary text.

getPhoneNumber

Added in 1.8.0-beta01
public @Nullable String getPhoneNumber()

Gets the phone number to show in the "dialed number" field which can be edited before calling.

See also
setPhoneNumber

getPhoneNumberChangedDelegate

Added in 1.8.0-beta01
public @Nullable InputCallbackDelegate getPhoneNumberChangedDelegate()

Returns the delegate that is used to fire dialed number change events back to the client app.

getPrimaryAction

Added in 1.8.0-beta01
public @Nullable Action getPrimaryAction()

Returns the primary action button. This is usually the call button, but the app can set this arbitrarily.

getTelephoneKeypadCallbackDelegate

Added in 1.8.0-beta01
public @Nullable TelephoneKeypadCallbackDelegate getTelephoneKeypadCallbackDelegate()

Returns the delegate that is used to fire key events back to the client app.

hashCode

public int hashCode()

toString

public @NonNull String toString()