BlackBerryForums.com : Your Number One BlackBerry Community      

»Sponsored Links




Closed Thread
 
LinkBack Thread Tools
  (#1 (permalink)) Old
hearntho Offline
New Member
 
Posts: 2
Join Date: Jan 2007
Model: 7520
Default GPS Location Error - 01-25-2007, 04:16 AM

Hello all,
I am currently working on a program for a school project that will be polling gps data off of the 7520 GPS-embedded blackberry. I cannot get it to run for the life of me, and I keep getting the following error:

Starting BlackBerryGPS
Class 'net.rim.device.api.gps.GPSRegistry' not found.Error starting BlackBerryGPS: Class 'net.rim.device.api.gps.GPSRegistry' not found.

I have searched EVERYWHERE for this specific class and to my knowledge it doesn't even exist. The code that I am calling the GPS information from is:

public String getLocation() {
LocationProvider prov;

try {
prov = LocationProvider.getInstance(null);

if (prov==null) {
Status.show("GPS not supported on this device");
return(null);
}
} catch (LocationException le) {
Status.show("Failed to instantiate GPS provider.");
return(null);
}

try {
String loc = prov.getLocation(30).getExtraInfo("text/plain");

Status.show(loc);
} catch (LocationException le) {
Status.show("30 sec timeout");
} catch (SecurityException se) {
Status.show("You do not have permission to query loc info");
} catch (InterruptedException ie) {
Status.show("An unexpected reset() called by another thread");
} catch (Exception unknown) {
Status.show("Unhandled exception, exiting");
}
return("test");
}

I'm not even calling this function yet, and as soon as the application begins to run on the BB, it crashes with the exception posted above. I have no idea what I am doing wrong here, any help would be GREATLY appreciated.

Cheers!
Tom
   
Sponsored Links
Please Login or Register to Remove these Advertisements!

  (#2 (permalink)) Old
Skipper_Joe Offline
Talking BlackBerry Encyclopedia
 
Skipper_Joe's Avatar
 
Posts: 237
Join Date: Jan 2007
Location: Kharkov, Ukraine
Model: 8300
Carrier: N/A
Default 01-26-2007, 02:50 AM

We had similar problems with old device OS versions 4.0.0.XXX. It was solved after we upgrade devices to 4.0.2.

Hope it help!
   
  (#3 (permalink)) Old
hearntho Offline
New Member
 
Posts: 2
Join Date: Jan 2007
Model: 7520
Default Thank you - 01-26-2007, 07:12 AM

Joe,
Thanks for the reply! Did you mean upgrade the BlackBerry OS to 4.0.2 or the JDE?

Cheers,
Tom
   
  (#4 (permalink)) Old
Skipper_Joe Offline
Talking BlackBerry Encyclopedia
 
Skipper_Joe's Avatar
 
Posts: 237
Join Date: Jan 2007
Location: Kharkov, Ukraine
Model: 8300
Carrier: N/A
Default 01-26-2007, 07:21 AM

You are welcome
BlackBerry OS on device itself.

JDE 4.0.2 is more comfortable for development and build compilation, because it contain GPS API out of the box, but it is not required. I compiled my code with JDE 4.0 and it worked on 4.0.2 devices too.
   
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On






Copyright © 2004-2008 BlackBerryNews.com, BlackBerryFAQ.com, BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of Research In Motion Limited.
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.1