NativeScript 9.1 Released → V8 14.9, Vite 8 HMR, built for rapid agentic visual iteration
Dig in

Call Signature ​

ts
function action(
   message: string, 
   cancelButtonText: string, 
actions: string[]): Promise<string>;

Defined in: ui/dialogs/index.d.ts:129

The action() method displays a action box that prompts the visitor to choose some action.

Parameters ​

ParameterTypeDescription
messagestringThe text to display in the dialog box.
cancelButtonTextstringThe text to display in the cancel button.
actionsstring[]List of available actions.

Returns ​

Promise<string>

Call Signature ​

ts
function action(options: ActionOptions): Promise<string>;

Defined in: ui/dialogs/index.d.ts:135

The action() method displays a action box that prompts the visitor to choose some action.

Parameters ​

ParameterTypeDescription
optionsActionOptionsThe options for the dialog box.

Returns ​

Promise<string>

Previous
_setResolver