This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java Micro Edition and the fly likes Location Api Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Location Api" Watch "Location Api" New topic

Location Api

Anil Kukreti

Joined: Oct 13, 2007
Posts: 11

Hi friends I am new to J2me programs development.
I 've written a program to access the location coordinates of a cell phone. Whenever i am running it on emulator, it's running fine but as soon as i am checking it on Nokia N82 it is raising "Location Exception". The code is as
public FindLocation(LocationMidlet locationMidlet){
this.locationMidlet = locationMidlet;
lp = LocationProvider.getInstance(null);
l = lp.getLocation(10);
}catch(LocationException e){
this.locationMidlet.list.append("Location Exception",null);
}catch(Exception e){

this.locationMidlet.list.append(" "+c.getLatitude(),null);
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15964

It would probably help if you printed the message text for the exception.

Customer surveys are for companies who didn't pay proper attention to begin with.
Austin Lee
Ranch Hand

Joined: Feb 18, 2008
Posts: 56
Try use the sdk of Nokia.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Location Api
Similar Threads
Class not found error
Redirect internal server error to custom JSP
ServerSocket problem w/ Jeode EVM on iPaq
Problem getting context in WLS 8.1
javax.microedition.location can not be resolved