Implementing Abstract Commands

MIDP implementors determine the user interface for abstract commands so that their presentation and selection mechanisms can be appropriate for the device. Following device conventions enables MIDlets to conform to the native style of the device and feel natural to users.

MIDP Implementors

Strongly Recommend: Java graphics bulb1_icon.gif Use device-appropriate mechanisms (such as soft buttons, hardware buttons, and menus) for your abstract command user interface. For example, if your device has "Go Back" operations on its right soft button, conform by placing a screen's highest-priority abstract command of type BACK on this button.

Strongly Recommend: Java graphics bulb1_icon.gif Order commands from the app by type, and within type, by priority. Do not order commands by priority without regard to type. In the typical situation, where many command types have multiple commands, ordering by priority would be confusing to the user.

Strongly Recommend: Java graphics bulb1_icon.gif If there is a command on a form item, let the user know by remapping the presentation of the abstract commands to include the item-specific abstract command. Make the item-specific command the most obvious one for the user. For example, place it first on a system menu.

Strongly Recommend: Java graphics bulb1_icon.gif Determine and publish your algorithm for mapping abstract commands onto your device.

For example, a MIDP implementation for a mobile phone could use the following algorithm. (The algorithm is similar to the one used by the MIDP Reference Implementation.)

  • Find any commands that map to hard buttons on the device, and assign them to those buttons.

    The highest-priority command of type BACK maps to the Back hard button.

    The highest-priority command of type EXIT maps to the End Call button (or whichever button takes the user back to the Main screen of the device).

  • Order the abstract commands by type in the following sequence: ITEM (associated with the item that has focus), ITEM (associated with the screen), SCREEN, and OK. These are abstract commands that users see as positive commands. Then order the rest of the commands by type in this sequence: HELP, BACK, CANCEL, STOP, and EXIT. These are abstract commands that users see as negative commands.
  • Within type, order the abstract commands by priority, highest to lowest.
  • Put the highest-priority negative command on one soft button, and the rest of the commands (positive followed by negative) on the other soft button. The MIDP Reference Implementation puts negative commands on the left, and positive commands on the right. Other devices might have other conventions.

    This algorithm gives users the ability to predict that negative commands are on one soft button, and positive commands are on the other. It is easily understood and accepted, even when the button the users consider positive has the extra negative commands at the bottom of its menu.

  • If there is more than one command for the soft button that lists the rest of the commands, give that button a label of Menu and put the commands on a system menu. Screenshot shows the system menu associated with the right soft button of a MIDlet.
    Screenshot System Menu

    Java graphics 12fig04.gif


The algorithm is useful for creating context-sensitive screens. If there are only item-specific commands on a screen, the command on the right system menu will change as the user traverses through the screen. To illustrate the algorithm, assume that SmartTicket associates the abstract commands shown in Table 12.2 with the screen that has the user choose a movie. Further, assume that SmartTicket associates the abstract commands shown in Table 12.1 with the items on the screen.

Table 12.1. Abstract Commands for SmartTicket Items

Command Type

Priority

Long Label

ITEM

1

"Update Schedule" (associated with the Theater item)

ITEM

1

"Show Preview" (associated only with the movie item)

Table 12.2. Abstract Commands on a SmartTicket Screen

Command Type

Priority

Long Label

EXIT

5

"Exit SmartTicket"

HELP

1

"Help"

ITEM

2

"Change Theater"

SCREEN

1

"My Settings"

SCREEN

2

"Main Menu"

The user interface for SmartTicket on the mobile phone would then look like the screens in Screenshot; the system menu changes as the user navigates through the form.
Screenshot SmartTicket on a Mobile Phone

Java graphics 12fig05.gif


Because each MIDP implementation will have its own algorithm, the user interface could look different on different devices. However, the benefit to users is that the presentation of abstract commands is integrated into the rest of the user interface on the device. Predictability is far more critical than having a consistent user interface across devices. (See "Make It Predictable" on page 9 for more information.)



   
Comments