×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Dec 2004
    Location
    Mexico City
    Posts
    14

    How to exit Application in Full Canvas without Command

    Hello everbody, I already know is not possible to use Commands in Full Canvas mode, now i'm starting to use icons to simulate commands... but I have problems with the exit icon, What I must to do to exit application when the full canvas is displayed?

    I'll really apreciate your help...

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    Code:
    void keyPressed(int code) {
      if (code == FullCanvas.KEY_SOFTKEY1) { // or KEY_SOFTKEY2 or 3, depending on the button you want
        // exit the application
      }
    }
    shmoove

  3. #3
    Registered User
    Join Date
    Dec 2004
    Location
    Mexico City
    Posts
    14
    Thanks for your answer shmoove...

    I did the following and work fine,
    First, in myCanvas constructor I add the midlet used,

    public myCanvas(MyMIDlet midlet) {
    this.midlet=midlet;
    display=Display.getDisplay(midlet);
    }


    then in the keyReleased method...

    protected void keyReleased(int keyCode){
    int action=getGameAction(keyCode);
    if(action==this.LEFT){
    midlet.destroyApp(false); //Exit application
    midlet.notifyDestroyed();
    }

    menu.keyReleased(action);
    }

    Gracias

  4. #4
    Registered User
    Join Date
    Dec 2004
    Location
    Mexico City
    Posts
    14
    Another question...

    Where can I find and download API for use FullCanvas

    Is it a Nokia's API??'

    I read in the forum it was something like com.nokia.fullCanvas

    Thanks in advance

  5. #5
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    You need to download any one of the Nokia SDKs and compile with their class libraries.

    And by the way, your code will exit when the user presses the left arrow (and on some phones it could also be the 4 key), and not the soft keys.

    shmoove

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •