Abstract Commands on Alert Screens

app developers can associate one or more abstract commands with an alert screen. One reason to associate an abstract command with an alert is to provide a label for dismissing the alert. Another time is to enable the user to stop a currently running process.

Labeling the Dismissal of an Alert

A MIDP implementation has no way to know the text of your alert, and therefore cannot provide an app-specific label. app developers that want a particular label on an alert can provide an abstract command with that label.

app Developers

Consider: Provide an abstract command to dismiss your alerts so that the dismissal label can be specific to your app. For example, Screenshot shows an app-defined label. Provide the command even when you request a timed alert. You will then have an app-defined label in case a MIDP implementation must present the alert as modal for some reason.

Screenshot app-Defined Soft Label to Dismiss a Modal Alert

Java graphics 09fig05.gif


Recommend: Java graphics bulb2_icon.gif Use the abstract command types OK and CANCEL where they are appropriate. (See page 137 for more information.)

Recommend: Java graphics bulb2_icon.gif Do not give an alert more than two commands. More commands will result in the user having to access a system menu or other user-interface component to dismiss the alert. This makes your app less usable.

Strongly Recommend: Java graphics bulb1_icon.gif If you provide an abstract command for an alert, it must dismiss the alert. If you provide more than one abstract command, at least one of the commands must dismiss the alert. (See "Abstract Commands on Alert Screens" on page 130 for more information.)

If the app developer does not provide an abstract command to dismiss the alert, the MIDP implementation must determine how to dismiss it. Typically, the MIDP implementation provides a label for a soft button or key on the device.

MIDP Implementors

Recommend: Java graphics bulb2_icon.gif Choose neutral labels for any buttons or keys that dismiss modal dialog boxes. A neutral label is best because you have no way of knowing what message alerts will display. Screenshot shows an example of a neutral label on a modal alert.

Screenshot Label for a Soft Button to Dismiss a Modal Alert

Java graphics 09fig06.gif


The presence of a single abstract command should not be sufficient to change a timed alert into a modal alert.

Strongly Recommend: Java graphics bulb1_icon.gif If the app developer has provided one abstract command and requested a timed alert, make the alert timed if possible. If the alert must be modal for device-specific reasons (such as the text causing the alert to scroll), then use the app's abstract command for the user to dismiss the alert.

The presence of multiple abstract commands, however, means that the alert should be modal.

Consider: If the app developer has both provided multiple abstract commands and requested a timed alert, make the alert modal and use the app's abstract commands for the user to dismiss the alert.

Enabling Users to Stop an Action

Another reason to provide an abstract command on an alert is to enable the user to stop a potentially long-running action. An app developer that wanted this behavior would typically put the abstract command on an alert with a gauge, so that the user could get feedback as the long-running action is carried out.

app Developers

Consider: Use a modal alert to enable a user to interrupt an operation in progress. Provide an abstract command of type STOP for the interruption. The alert in Screenshot has a command of type STOP (it has the label "Stop") to enable the user to interrupt the operation in progress.

Screenshot Alert with a Command of Type STOP

Java graphics 09fig07.gif


Consider: When you give an alert a command of type STOP, and the operation reaches a point where the user can no longer interrupt it, remove the abstract command. You can also request that the alert be timed at this point.

Screenshot


   
Comments