showAlert( )


Creates and opens an alert modal on a mobile app.

developer preview tag

When an app user selects an action button in the alert modal, the showAlert() function returns a promise that resolves to the alert's result.

You can customize the alert modal's title and message, and choose which actions an app user can take when the modal appears.

Method Declaration
Copy
Method Parameters
titlestringRequired

Alert title.


messagestringRequired

Alert message.


actionsActionsRequired

Alert actions.

Returns
Return Type:Promise<AlertResult>
Did this help?