Skip to main content

NotificationActionInput

Input collected when a notification action is selected.

Used by NotificationAction.input.

Note

Android supports reply choices, free-form text, and MIME-type hints. iOS/macOS use a text-input action; Windows uses a separate text box associated with the action ID. Linux and Web show the action as a regular button without an input.

Properties

Properties​

allow_free_formclass-attributeinstance-attribute​

allow_free_form: bool = True

Whether to allow the user to type an arbitrary reply.

Set to False with choices to restrict replies to suggestions.

Note

Supported only on Android. Reply inputs on iOS, macOS, and Windows allow free-form text.

allowed_mime_typesclass-attributeinstance-attribute​

allowed_mime_types: list[str] = field(default_factory=list)

Accepted reply MIME types, such as "image/png".

An empty list requests no MIME-type-specific input.

Note

The event model exposes text responses, not a dedicated attachment-result field. MIME-type filtering is supported only on Android.

choicesclass-attributeinstance-attribute​

choices: list[str] = field(default_factory=list)

Suggested reply strings.

An empty list provides no predefined choices.

Note

Supported only on Android.

labelclass-attributeinstance-attribute​

label: str | None = None

User-visible label describing the input.

Note

On Android, labels the reply input. On iOS/macOS, supplies the text-input button title and placeholder; None uses the action title for the button. On Windows, supplies the text box title and placeholder.