MIDLet.destroyApp() and turning back to applications screen

Hi all,
When I choose exit in the code develivered with the Wireless Toolkit the screen returns to a screen filled with available MIDlets. When I choose exit in my application, the screen stays like it was in my MIDlet. How come?
Some code to clarify. First the Canvas class
   public void keyPressed(int keyNumber) {
         if ((keyNumber == KEY_POUND) || (keyNumber == KEY_STAR)) {
              // User wants to quit.
              myGame.closeConnection();
    }As you see, a method in myGame is called. MyGame implements Runnable. It communicates using Bluetooth with another MIDlet:
     public void closeConnection () {
          try {
               ins.close();
               dins.close();
               outs.close();
               douts.close();
               connection.close();
          catch (IOException ioException) {
               displayMessage("IO Error", "Unable to close " +
                         "the connection (IOException: " +
                         ioException.getMessage() + ")");
          finally {
               synchronized(this) {
                     isGameCompleted = true;
                     notifyAll ();
               myMIDlet.destroyApp(true);
     }And again, another class is called. This class, MyMIDlet contains the following destroyApp method:
    public void destroyApp(boolean unconditional) {
    }When I look at the example code (%WTK24%\apps\Demos\src\example\manyballs) delivered with the Wireless Toolkit is see the following code (first ManyBalls):
    public void destroyApp(boolean unconditional)
            throws MIDletStateChangeException {
        canvas.destroy();
    }The following code is called in the object ManyCanvas. It deletes all created balls:
    void destroy() {
        // kill all the balls and terminate
        for (int i = 0; i < balls.length && balls[i] != null; i++) {
            balls.stop = true;
// enable the balls to be garbage collected
balls[i] = null;
numBalls = 0;
So, how does it go back to the screen containing all the available MIDlets?
Maik

Try resetting the iPhone. Hold the Home and Sleep buttons until the Apple logo appears.

Similar Messages

Maybe you are looking for

  • IPod communication error when i updated iTunes!

    I updated my itunes and now when i connect my iPod Nano to my computer this error message appears: The software for communicating with the iPod is not installed correctly. Please reinstall iTunes to intall the iPod's software. When I reinstall iTunes

  • Image in a JTable

    Hello, i am trying to display an image.gif in a JTable using cellrenderer but i always get an error message. Everybodys help its always accepted. I did paste just a few parts of the code since its very long. In the cellrenderer class i have scored ou

  • Displayport stopped after using VGA

    Hello everyone, I have put a VGA monitor on my VGA port of the T520 (built in Intel graphics). This went fine.   Back at home I wanted to connect my Displayport monitor again, but this fails.  It seems like my T520 does not want release the VGA monit

  • Write statement after ALV

    Hello, I have a requirement where I am displaying the ALV using grid. Have a button on top. After ALV display, I select the row and press the button. The processing takes place like (Delivery creation). After this delivery creation, I have to display

  • Sun One Web Server 6.1 with MS Active Directory??

    I know this type of question has been posted a few times, but I couldnt locate any clear answer. Can we have Sun One WS 6.1 use MS Active Dir as its source of users and groups? I am trying to configure this using the standard base DN and bind DN para