0

I'm writing a Java ME Midlet for a Nokia N82, I want to just count down from 30 and restart when it reaches 0. Whenever i move the .jar and .jad file and try to run them from the mobile phone it will say that it can't install the midlet or that the application is not compatible with the phone. The code i have is:

import java.util.*;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;

public class myMidlet extends MIDlet implements CommandListener{

  private Form form;
  private Display display;
  private int tt;
  private int ttinc;
  private Timer tm;

  public myMidlet(){
      ttinc=30;
      tt=-1;
      tm=new Timer();
  }

  public void startApp(){
    showInput();
  }

  public void pauseApp(){}

  public void destroyApp(boolean destroy){
    notifyDestroyed();
  }

  public void showInput(){
    display = Display.getDisplay(this);
    Form form = new Form("GPS");
    if(tt<0){
        form.append("Sending update...");
    }else{
        form.append("Sending update in "+tt+" seconds.");
        tt--;
    }
    tm.schedule(new TodoTask(), 1000);

    display.setCurrent(form);
  }

  public void commandAction(Command c, Displayable d) {}

  public class TodoTask extends TimerTask{
     public final void run(){
        showInput();
     }
  }
}

What can i do/try to get this working?

1 Answer 1

2

It seems you have made a build that is not compatible to phone.

make sure you set MIDP 2.0 ,CLDC 1.1 and then build this conf. is mostly supported in every phone. and make it relevant to your N82

Sign up to request clarification or add additional context in comments.

3 Comments

I've changed this configuration and tested it. Now when i run it it will ask me whether i trust the application or not and than result in the original error.
how do you install your app ?
by just moving it and running the file, anyways i got it working. tha nks a lot! =D

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.