Interface: AndroidInput

Defined in: packages/react-native/src/types/NotificationAndroid.ts:537

The interface used to enable advanced user input on a notification.

View the Action Input documentation to learn more.

Platform

android

Properties

allowFreeFormInput?

optional allowFreeFormInput: boolean

Defined in: packages/react-native/src/types/NotificationAndroid.ts:548

Sets whether the user can freely enter text into the input.

This value changes the behaviour of the notification:

  • If true, when an action is pressed this allows the user to type free form text into the input area.
  • If false, you must provide an array of choices the user is allowed to use as the input.

Defaults to true.

allowGeneratedReplies?

optional allowGeneratedReplies: boolean

Defined in: packages/react-native/src/types/NotificationAndroid.ts:558

Sets whether generated replies can be added to the action.

Generated replies will only be shown if the input has choices and whether the device is able to generate replies.

Defaults to true.

choices?

optional choices: string[]

Defined in: packages/react-native/src/types/NotificationAndroid.ts:565

An array of pre-defined input choices the user can select.

If allowFreeFormInput is false, this property must contain at least one choice.

editableChoices?

optional editableChoices: boolean

Defined in: packages/react-native/src/types/NotificationAndroid.ts:574

If true, the user will be able to edit the selected choice before sending the action event, however allowFreeFormInput must also be true.

By default, the platform will decide whether choices can be editable. To explicitly enable or disable this, provide true or false.

placeholder?

optional placeholder: string

Defined in: packages/react-native/src/types/NotificationAndroid.ts:579

The placeholder text to display inside of the user input area.