TelephoneKeypadCallback


@ExperimentalCarApi
interface TelephoneKeypadCallback


Callbacks generated by the TelephoneKeypadTemplate.

Summary

Public functions

Unit
onKeyDown(key: Int)

Called when a key is pushed.

Unit

Called when a key is pressed and held.

Unit
onKeyUp(key: Int)

Called when a key is released.

Public functions

onKeyDown

Added in 1.8.0-beta01
fun onKeyDown(key: Int): Unit

Called when a key is pushed. This is only called once for each user interaction, even if the key is held down (eg. does not repeat the same event call for a single key push).

This event provides the key that was pressed in the form of an int constant defined in the TelephoneKeypadTemplate object prefixed with `KEY_`.

onKeyLongPress

Added in 1.8.0-beta01
fun onKeyLongPress(key: Int): Unit

Called when a key is pressed and held. The length of time between key down and this event is determined by the host and always fires in the following order:

  1. Key down
  2. Key long press
  3. Key up
This event provides the key that was pressed in the form of an int constant defined in the TelephoneKeypadTemplate object prefixed with `KEY_`.

onKeyUp

Added in 1.8.0-beta01
fun onKeyUp(key: Int): Unit

Called when a key is released. This is only called once for each user interaction.

This event provides the key that was pressed in the form of an int constant defined in the TelephoneKeypadTemplate object prefixed with `KEY_`.