×

Discussion Board

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

    Red face Midlet not getting started in N72

    Hi,

    I have a small program which tests the Location of the user.
    When running in Emulator the latitude and longitude measurements are given as zero's.
    But when i am deploying the application in My Nokia N72 model, the application is not getting started.

    I'm posting the code below.

    Any help or suggestions will be appreciated.

    package hello;

    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.location.*;

    public class HelloMIDlet extends MIDlet implements CommandListener,Runnable {

    Command Exit = new Command("Exit",Command.EXIT,0);
    Command next;
    public static Display dis;
    Form f = null;Form f1 = null;
    public HelloMIDlet() {

    dis = Display.getDisplay(this);
    }

    public void startApp() {
    HelloMIDlet.dis.setCurrent(FirstForm());

    }
    public Form FirstForm()
    {
    f1=new Form("FirstForm");
    f1.append("FirstForm");
    next = new Command("Next", Command.OK, 1);
    f1.setCommandListener(this);
    f1.addCommand(next);
    return f1;
    }
    public Form SecondForm()
    {
    f=new Form("Waiting...");
    f.append("Finding for location...");
    f.addCommand(Exit);
    f.setCommandListener(this);

    try {
    Criteria c=new Criteria();
    c.setHorizontalAccuracy(1000);
    c.setVerticalAccuracy(1000);
    c.setPreferredPowerConsumption(Criteria.POWER_USAGE_LOW);
    LocationProvider lp=LocationProvider.getInstance(c);
    Location loc=lp.getLocation(60);
    QualifiedCoordinates qc=loc.getQualifiedCoordinates();
    f.append("Hello");
    f.append("Alt: "+qc.getAltitude());
    f.append("Lat: "+qc.getLatitude());
    f.append("Long: "+qc.getLongitude());

    } catch(Exception e) {
    f.append("Exception: "+e);
    }
    return f;
    }
    public void pauseApp() {}

    public void destroyApp(boolean destroy) {}

    public void commandAction(Command c, Displayable s) {
    if (c == Exit) {
    destroyApp(true);
    notifyDestroyed();
    }
    if(c == next)
    {
    Thread t = new Thread(this);
    t.start();
    }
    }

    public void run() {
    HelloMIDlet.dis.setCurrent(SecondForm());
    throw new UnsupportedOperationException("Not supported yet.");
    }
    }


    Please respond at the earliest.

  2. #2
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: Midlet not getting started in N72

    Hey Welcome to the Forum Nokia Discussion Boards..
    But when i am deploying the application in My Nokia N72 model, the application is not getting started.
    Well if you check the Nokia N72 Technical details then you will come to know that this device does not support the Location API. Hence the app that you had developed is not working.

    Please check the details Here
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  3. #3
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    1,595

    Re: Midlet not getting started in N72

    Hello buthpur.kiran.mavin,

    Location API information on supported Nokia platform Editions (for both Series 40 and Symbian platforms) is available in Forum Nokia Java Developer's Library:

    Java Developer's Library 3.5 > Implementation notes > (JSR-179) Location API > Changes between releases

    Regards,
    r2j7
    [URL="http://library.forum.nokia.com/java"][B] >>> Java Developer's Library <<<[/B][/URL]
    [URL="https://www.developer.nokia.com/Resources/Support/Technical_support.xhtml"] [B]>>> Technical Support for Java ME development <<<[/B][/URL]
    [URL="https://publish.ovi.com/info/"][B]>>> Nokia Publish: reach millions of Nokia users worldwide through Nokia Store <<<[/B][/URL]

Similar Threads

  1. How to enable my own CA cert for midlet app installation in S60 5th emulator
    By cschlesinger in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2010-01-19, 23:58
  2. Strange behavior when altering MIDlet connectivity setting
    By wilhelm4711 in forum Mobile Java General
    Replies: 0
    Last Post: 2009-11-18, 23:12
  3. start midlet by bluetooth on S40
    By peba25 in forum Mobile Java Networking & Messaging & Security
    Replies: 15
    Last Post: 2009-11-05, 09:35
  4. Replies: 2
    Last Post: 2007-03-12, 12:19
  5. How to create two instances of midlet
    By marquito99 in forum Mobile Java General
    Replies: 0
    Last Post: 2004-04-30, 01: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
  •  
×