File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java Micro Edition and the fly likes Problem with accessing the build-in GPS on nokia (N95) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Problem with accessing the build-in GPS on nokia (N95) " Watch "Problem with accessing the build-in GPS on nokia (N95) " New topic

Problem with accessing the build-in GPS on nokia (N95)


Joined: Mar 11, 2008
Posts: 1

i bought nokia N95 which has JSR-179 support;

however i couldn't communicate with the GPS receiver to get the location;

this is the code:

Criteria cr = new Criteria();
LocationProvider provider = LocationProvider.getInstance(cr);
Location location = provider.getLocation(30);
System.out.println("Method : " + location.getLocationMethod());
QualifiedCoordinates co = location.getQualifiedCoordinates();
if (co != null) {
System.out.println("Long: " + co.getLongitude());
System.out.println("Lat : " + co.getLatitude());
System.out.println("Alt : " + co.getAltitude());


Method : 0
Long: 0.0
Lat : 0.0
Alt : 0.0

i keep on getting zeros in the coordinates?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16913


Welcome to the JavaRanch. We don't have many rules around here, but there is one rule we insist on. Despite what you might think when you see the moth-eaten moose head at the top of our forums, we like to pretend we're all professionals here. So we must insist that you follow our our naming policy ( Thanks!
jQuery in Action, 3rd edition
subject: Problem with accessing the build-in GPS on nokia (N95)
It's not a secret anymore!