This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Location Api

 
Anil Kukreti
Greenhorn
Posts: 11
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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;
cr.setHorizontalAccuracy(500);
cr.setVerticalAccuracy(500);
try{
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(""+e,null);
}

if(c!=null){
this.locationMidlet.list.append(" "+c.getLatitude(),null);
}
}
thanks
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17627
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would probably help if you printed the message text for the exception.
 
Austin Lee
Ranch Hand
Posts: 56
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try use the sdk of Nokia.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic