[ Web Proxy ]
URL:
Viewing: https://developer.android.com/reference/android/security/ConfirmationCallback [Back]  [Original]

ConfirmationCallback  |  API reference  |  Android Developers Skip to main content
Essentials Design & Plan Develop Google Play Blog
Search:
Android Studio
Android Developers [Android Developers]
Stay organized with collections Save and categorize content based on your preferences.

ConfirmationCallback


public abstract class ConfirmationCallback
extends Object

java.lang.Object
   ↳ android.security.ConfirmationCallback


Callback class used when signaling that a prompt is no longer being presented.

Summary

Public constructors

ConfirmationCallback()

Public methods

void onCanceled()

Called when the requested prompt was dismissed by the application.

void onConfirmed(byte[] dataThatWasConfirmed)

Called when the requested prompt was accepted by the user.

void onDismissed()

Called when the requested prompt was dismissed (not accepted) by the user.

void onError(Throwable e)

Called when the requested prompt was dismissed because of a low-level error.

Inherited methods

Public constructors

ConfirmationCallback

public ConfirmationCallback ()

Public methods

onCanceled

Added in API level 28
public void onCanceled ()

Called when the requested prompt was dismissed by the application.

onConfirmed

Added in API level 28
public void onConfirmed (byte[] dataThatWasConfirmed)

Called when the requested prompt was accepted by the user. The format of 'dataThatWasConfirmed' parameter is a CBOR encoded map (type 5) with (at least) the keys prompt and extra. The keys are encoded as CBOR text string (type 3). The value of promptText is encoded as CBOR text string (type 3), and the value of extraData is encoded as CBOR byte string (type 2). Other keys may be added in the future.

Parameters
dataThatWasConfirmed byte: the data that was confirmed, see above for the format.
This value cannot be null.

onDismissed

Added in API level 28
public void onDismissed ()

Called when the requested prompt was dismissed (not accepted) by the user.

onError

Added in API level 28
public void onError (Throwable e)

Called when the requested prompt was dismissed because of a low-level error.

Parameters
e Throwable: a throwable representing the error.

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2026-08-03 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-03 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page