AlertCallback


@CarProtocol
@RequiresCarApi(value = 5)
interface AlertCallback


A listener of dismiss events.

Summary

Constants

const Int

Indicates the cancellation is due to the request not being supported, e.g. when current template cannot display the alert.

const Int

Indicates the cancellation is due to timeout.

const Int

Indicates the cancellation is due to user generated action, e.g. close button being pressed.

Public functions

Unit
onCancel(reason: Int)

Notifies that a cancel event happened with given reason.

Unit

Notifies that a dismiss happened.

Constants

REASON_NOT_SUPPORTED

Added in 1.2.0
const val REASON_NOT_SUPPORTED = 3: Int

Indicates the cancellation is due to the request not being supported, e.g. when current template cannot display the alert.

REASON_TIMEOUT

Added in 1.2.0
const val REASON_TIMEOUT = 1: Int

Indicates the cancellation is due to timeout.

REASON_USER_ACTION

Added in 1.2.0
const val REASON_USER_ACTION = 2: Int

Indicates the cancellation is due to user generated action, e.g. close button being pressed.

Public functions

onCancel

Added in 1.2.0
fun onCancel(reason: Int): Unit

Notifies that a cancel event happened with given reason.

onDismiss

Added in 1.2.0
fun onDismiss(): Unit

Notifies that a dismiss happened.