Command mapping and handling

In the Nokia Asha software platform, Commands (except Back command) can be mapped to option menu and to toolbar.

Toolbar and Option menu

In Screen and Canvas, the highest priority commands are shown on the screen as a toolbar buttons. All the other Commands (except Back and Exit commands) are listed in the option menu.

Series 40 full touch

Nokia Asha software platform

In the Series 40 full touch, Command/IconCommand with the highest priority will be assigned to action button 1, and other commands will be assigned to action button 2 (under the option menu).

In the Nokia Asha software platform, it is the Command’s priority that decides the placement in the toolbar button and then the command’s type (1. STOP, 2. CANCEL, 3. EXIT) .

Back key

There is a new physical button, back key in the device. MIDlets must use the Back key for backstepping. When the main-level has been reached, the back button press should be treated as exit. On other views the key should work as a step back to higher hierarchy level. Back stepping should be implemented by the developer. See the Asha Design Guidelines for more information about backstepping.

Back key behaviour

  • If the MIDlet has an Exit Command implemented, pressing the Back key closes the MIDlet. No confirmation dialog is shown.

  • If the MIDlet has a Back Command implemented, pressing the Back key handles the Back Command.

  • If the MIDlet has a Back and Exit Commands implemented, the Back command is mapped to the Back key and the Exit Command to the options menu.

  • If the Exit Command is mapped to the Back key, it is normally handled by using the commandAction() method.

  • The MIDlet can be closed by pressing the Back key, when there is no Exit or custom Back Command implementation. A confirmation dialog is shown in this case. An Exit Command should be added in the main view, as the proper way to terminate the MIDlet.

  • MIDlets can be closed also by swiping horizontally from either edge of the screen.

  • If there is a custom implementation of the Back or Exit Commands, the only way to close the MIDlet is to swipe the screen or long press the Back key. In order to comply with the Asha Design Guidelines, developers should implement an Exit Command, as the proper means to terminate the MIDlet.

Note:

Developers porting their full-canvas MIDlet should remove any back or exit buttons from their MIDlet canvas and use Back/Exit command in order to map back-stepping to the hardware back button.