Oracle® Java ME Embedded Application Management System API Guide Release 3.4 E35109-03 |
|
Previous |
Next |
This chapter discusses how to use the AMS Request Manager. The AMSRequestManager
interface is obtained from the AmsFactory
class and is used to set an AMSRequestListener
to listen for any special requests for the AMS UI MIDlet. The interface consists of only one method, void setEventListener(AMSRequestListener theListener)
. This method assigns the request manager listener.
The AMSRequestListener
interface is used for processing system requests to the AMS. It consists of two methods:
void selectForegroundRequest()
This method notifies the listener that it has received a request to select one of several running applications. The AMS UI MIDlet should present the user with a list of possibilities, and allow he or she to select one application from the list. After the particular application is selected, the AMS UI is responsible for requesting foreground for it. This notification is delivered only to the MIDlet which is registered to be the main AMS MIDlet.
void switchToAMSRequest()
This method notifies the AMS UI that it has received a request to switch the main AMS screen, possibly as the result of the user pressing the "Home" button on the device. At this point, the AMS UI should set its main screen as the current displayable. This notification is delivered only to the MIDlet which is registered to be the main AMS MIDlet.