This namespace provides access to the dialog-related functionality.
- Since:
- Version 1.1 (API level 2)
Classes
Methods
-
static createErrorDialog(message) → {mobicontrol.message.ConfirmationDialog}
-
Create an error type confirmation dialog. By default, the created dialog will have the title 'MobiControl', an 'OK' button, an error icon and a timeout of 5 minutes.
Parameters:
Name Type Description message
string The message displayed in the dialog. Returns:
mobicontrol.message.ConfirmationDialog - The created confirmation dialog.- Since:
- Version 1.1 (API level 2)
Example
mobicontrol.message.createErrorDialog('The device is low on memory!').show();
-
static createInfoDialog(message) → {mobicontrol.message.ConfirmationDialog}
-
Create an info type confirmation dialog. By default, the created dialog will have the title 'MobiControl', an 'OK' button, an info icon and a timeout of 5 minutes.
Parameters:
Name Type Description message
string The message displayed in the dialog. Returns:
mobicontrol.message.ConfirmationDialog - The created confirmation dialog.- Since:
- Version 1.1 (API level 2)
Example
mobicontrol.message.createInfoDialog('You received a text message.').show();
-
static createOkCancelDialog(message) → {mobicontrol.message.ConfirmationDialog}
-
Create a confirmation dialog with an 'OK' and a 'Cancel' button. By default, the created dialog will have the title 'MobiControl', an 'OK' button, a 'Cancel' button, a question mark icon and a timeout of 5 minutes.
Parameters:
Name Type Description message
string The message displayed in the dialog. Returns:
mobicontrol.message.ConfirmationDialog - The created confirmation dialog.- Since:
- Version 1.1 (API level 2)
Example
mobicontrol.message.createOkCancelDialog('The system upgrade is about to start.').show();
-
static createTextPromptDialog(message) → {mobicontrol.message.TextPromptDialog}
-
Create a dialog with a text box. By default, the created dialog will have the title 'MobiControl', no icon and a timeout of 5 minutes.
Parameters:
Name Type Description message
string The message displayed in the dialog. Returns:
mobicontrol.message.TextPromptDialog - The created text prompt dialog.- Since:
- Version 1.1 (API level 2)
Example
mobicontrol.message.createTextPromptDialog('What is the account number?') .withCallback(onConfirm).show(); function onConfirm(result) { mobicontrol.log.info(result.inputText); }
-
static createWarnDialog(message) → {mobicontrol.message.ConfirmationDialog}
-
Create a warning type confirmation dialog. By default, the created dialog will have the title 'MobiControl', an 'OK' button, a warning icon and a timeout of 5 minutes.
Parameters:
Name Type Description message
string The message displayed in the dialog. Returns:
mobicontrol.message.ConfirmationDialog - The created confirmation dialog.- Since:
- Version 1.1 (API level 2)
Example
mobicontrol.message.createWarnDialog('The device has poor Wi-Fi connection.').show();
-
static createYesNoDialog(message) → {mobicontrol.message.ConfirmationDialog}
-
Create a confirmation dialog with a 'Yes' and a 'No' button. By default, the created dialog will have the title 'MobiControl', a 'Yes' button, a 'No' button, a question mark icon and a timeout of 5 minutes.
Parameters:
Name Type Description message
string The message displayed in the dialog. Returns:
mobicontrol.message.ConfirmationDialog - The created confirmation dialog.- Since:
- Version 1.1 (API level 2)
Example
mobicontrol.message.createYesNoDialog('Would you like to clean up the memory?').show();
-
static dismiss(dialogId)
-
Dismiss the dialog with the given ID.
Parameters:
Name Type Description dialogId
number The dialog ID as returned from mobicontrol.message.ConfirmationDialog.show or mobicontrol.message.TextPromptDialog.show. - Since:
- Version 1.1 (API level 2)
Example
var dialogId = mobicontrol.message.createInfoDialog('The dialog will be dismissed in 1 second.').show(); setTimeout(delayFunction, 1000); function delayFunction() { mobicontrol.message.dismiss(dialogId); }