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 |
|---|
public final class TelephoneKeypadTemplate.BuilderA builder for |
public interface TelephoneKeypadTemplate.PhoneNumberChangeListenerAn interface for clients to receive events about the phone number changing. |
Constants |
|
|---|---|
static final int |
KEY_EIGHT = 8The `8` key in the keypad. |
static final int |
KEY_FIVE = 5The `5` key in the keypad. |
static final int |
KEY_FOUR = 4The `4` key in the keypad. |
static final int |
KEY_NINE = 9The `9` key in the keypad. |
static final int |
KEY_ONE = 1The `1` key in the keypad. |
static final int |
KEY_POUND = 11The `#` key in the keypad. |
static final int |
KEY_SEVEN = 7The `7` key in the keypad. |
static final int |
KEY_SIX = 6The `6` key in the keypad. |
static final int |
KEY_STAR = 10The `*` key in the keypad. |
static final int |
KEY_THREE = 3The `3` key in the keypad. |
static final int |
KEY_TWO = 2The `2` key in the keypad. |
static final int |
KEY_ZERO = 0The `0` key in the keypad. |
Public constructors |
|---|
|
Default empty constructor for the serializer. |
Public methods |
|
|---|---|
boolean |
|
@Nullable Header |
Returns the |
@NonNull Map<Integer, CarText> |
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 |
hashCode() |
@NonNull String |
toString() |
Constants
Public constructors
TelephoneKeypadTemplate
@VisibleForTesting
public TelephoneKeypadTemplate()
Default empty constructor for the serializer.
Public methods
getHeader
public @Nullable Header getHeader()
Returns the Header to show in this template.
getKeySecondaryTexts
public @NonNull Map<Integer, CarText> getKeySecondaryTexts()
Returns the mapping of key -> text for the keypad button's secondary text.
getPhoneNumber
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
public @Nullable InputCallbackDelegate getPhoneNumberChangedDelegate()
Returns the delegate that is used to fire dialed number change events back to the client app.
getPrimaryAction
public @Nullable Action getPrimaryAction()
Returns the primary action button. This is usually the call button, but the app can set this arbitrarily.
getTelephoneKeypadCallbackDelegate
public @Nullable TelephoneKeypadCallbackDelegate getTelephoneKeypadCallbackDelegate()
Returns the delegate that is used to fire key events back to the client app.