Class: Toybox.ActivityPrompts.ActivityPromptDelegate

Overview

Delegate used by the system to notify the app about activity prompts

Registered using ActivityPrompts.registerActivityPromptListener() to allow an app to get notified when an activity prompt should be played.

Since:

API Level 5.2.0

Instance Method Summary collapse

Instance Method Details

onAudioOutputChange(selectedHandler as Lang.Boolean) as Void

Called by the system if ActivityPrompts.registerActivityPromptListener() has been called and the user has changed the activity prompt output provider.

Parameters:

  • selectedHandler(Lang.Boolean)

    true if the app is now the activity prompt handler, false otherwise

Since:

API Level 5.2.0

onPrompt(prompts as Lang.Array<ActivityPrompts.ActivityPrompt>, priority as Lang.Number) as Void

Called by the system when an activity prompt is to be played

Parameters:

  • prompts(ActivityPrompt>)

    The prompts to play

  • priority(Lang.Number)

    The priority of the prompt. Lower values should take precendence over higher values.

Since:

API Level 5.2.0


Generated Dec 4, 2025, 10:13:08 AM