Class: Toybox.WatchUi.ConfirmationDelegate

Overview

ConfirmationDelegate responds to a Confirmation selection.

See Also:

Example:

import Toybox.WatchUi;
import Toybox.System;
import Toybox.Lang;

class MyConfirmationDelegate extends ConfirmationDelegate {
    function initialize() {
        ConfirmationDelegate.initialize();
    }

    function onResponse(response as Confirm) as Boolean {
        if (response == WatchUi.CONFIRM_NO) {
            System.println("Cancel");
        } else {
            System.println("Confirm");
        }
        return true;
    }
}

Since:

API Level 1.0.0

App Types and Runtime Contexts:

  • Audio Content Provider

  • Data Field

  • Glance

  • Watch App

  • Watch Face

  • Widget

Instance Method Summary collapse

Instance Method Details

onResponse(response as WatchUi.Confirm) as Lang.Boolean

A confirmation selection was made.

This method is called when a Confirmation response is selected, and receives the response as an argument. The response is either a CONFIRM_NO or CONFIRM_YES value.

Parameters:

See Also:

Since:

API Level 1.0.0


Generated Oct 19, 2026, 4:16:40 PM