×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    30

    Midlet doesn't start on N70

    Hi
    I have a Midlet which runs ok on emulator (with EasyEclipse) and doesn't start on N70.
    Have you got an idea ?


    this is the code for the main of the midlet :

    package com.ode.air;

    import java.io.IOException;

    import javax.microedition.lcdui.Alert;
    import javax.microedition.lcdui.AlertType;
    import javax.microedition.lcdui.Command;
    import javax.microedition.lcdui.CommandListener;
    import javax.microedition.lcdui.Display;
    import javax.microedition.lcdui.Displayable;
    import javax.microedition.lcdui.Image;
    import javax.microedition.midlet.MIDlet;
    import javax.microedition.midlet.MIDletStateChangeException;

    public class AirOdeMidlet extends MIDlet implements CommandListener {

    public static final boolean DEBUG = false;

    /**
    * The display
    */
    Display display;

    /**
    * The Model object
    */
    Deliveries deliveries;

    /**
    * All the commands for the application
    */
    Command menuCommand = new Command("Menu", Command.OK, 1);

    Command ajout_interCommand = new Command("Ajouter inter.", Command.ITEM, 1);

    Command liste_inter_in_progressCommand = new Command(
    "Liste inter. en cours", Command.ITEM, 2);

    Command histo_interCommand = new Command("Histo. inter à 7j.",
    Command.ITEM, 3);

    Command parametresCommand = new Command("Paramètres", Command.ITEM, 4);

    Command exitCommand = new Command("Sortie", Command.EXIT, 0);

    /**
    * All the screens of the application
    */
    // WelcomeScreen welcomeScreen = new WelcomeScreen();
    DownloadScreen downloadScreen = new DownloadScreen();

    ListScreen listScreen = new ListScreen();

    EditScreen editScreen = new EditScreen();

    SettingsScreen settingScreen = new SettingsScreen();

    ListeinterinprogressScreen liste_inter_in_progressScreen = new ListeinterinprogressScreen(this);

    FirstScreen firstScreen = new FirstScreen(this);

    public AirOdeMidlet() {
    display = Display.getDisplay(this);

    firstScreen.addCommand(ajout_interCommand);
    firstScreen.addCommand(liste_inter_in_progressCommand);
    firstScreen.addCommand(histo_interCommand);
    firstScreen.addCommand(parametresCommand);
    firstScreen.addCommand(exitCommand);
    firstScreen.setCommandListener(this);

    }

    protected void startApp() throws MIDletStateChangeException {
    // if (deliveries.hasData())
    {
    // display.setCurrent(listScreen);
    }
    // else
    Displayable current = display.getCurrent();
    if (current == null) {
    // first time we've been called, get the logo image
    Image logo = null;
    try {
    logo = Image.createImage("/images/logoODE.png");
    } catch (IOException e) {
    System.out.println("img bug="+e);
    // // just use null image
    }
    Alert splashScreen = new Alert(null,
    " ODE On The Air Welcome!",
    logo, AlertType.INFO);
    // Display the application’s first UI screen
    splashScreen.setTimeout(5000); // 4 seconds
    display.setCurrent(splashScreen, firstScreen);
    } else {
    // display.setCurrent(welcomeScreen);
    }

    // display.setCurrent(welcomeScreen);

    }

    // This firstScreen callback ends the application
    public void firstScreenQuit() throws MIDletStateChangeException {
    destroyApp(false);
    notifyDestroyed();
    }

    protected void pauseApp() {
    // TODO Auto-generated method stub

    }

    protected void destroyApp(boolean arg0) {
    // deliveries.close();
    notifyDestroyed();

    }

    public void commandAction(Command c, Displayable d) {

    if (c == liste_inter_in_progressCommand) {
    display.setCurrent(liste_inter_in_progressScreen);
    } else if (c == ajout_interCommand) {

    } else if (c == histo_interCommand) {

    } else if (c == parametresCommand) {

    }

    else if (c == exitCommand) {
    destroyApp(true);
    }

    }
    };

    Thanks a lot
    ERIC

  2. #2
    Super Contributor
    Join Date
    Nov 2003
    Location
    Bangalore , India
    Posts
    4,429

    Re: Midlet doesn't start on N70

    Hi emillaud! Welcome to Nokia Discussion Boards!!

    Please make sure that your JAD/MF entries are correct and they match each other. Are you getting any Errors or Exceptions? Also please make sure that you are not using any API not supported by the phone. May be you could provide the full source code so that some one here could give a try.

    Regards
    Gopal

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    30

    Re: Midlet doesn't start on N70

    Hi
    I have found the problem was on JAD file.
    Thanks
    ERIC

Similar Threads

  1. Security prompt signed midlet N70
    By fstifter in forum Mobile Java Networking & Messaging & Security
    Replies: 5
    Last Post: 2006-03-30, 17:40
  2. Auto start midlet
    By kirtimishra0609 in forum Mobile Java General
    Replies: 0
    Last Post: 2005-02-21, 19:55
  3. Start MIDLET from C++ Applicatio
    By kljajo in forum Symbian
    Replies: 2
    Last Post: 2005-01-12, 16:35
  4. Nokia 6610 MIDlet start problem
    By drkurt in forum Mobile Java General
    Replies: 1
    Last Post: 2004-01-27, 09:48
  5. Possible to start a midlet from a midlet?
    By thorsbro in forum Mobile Java General
    Replies: 1
    Last Post: 2003-06-25, 06:33

Posting Permissions

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