04-10-2012 11:50 AM
hello guys, I have just tried Blackberry GPS API to get current location using this criteria (depend on GPS only).
LocationProvider provider = LocationProvider.getInstance(myCriteria);
Location location = provider.getLocation(180);
I run the code into blackberry OS 6 (Torch) with GPS enabled on the option menu but got time out error.
I have made sure Option -> Device -> Location Settings -> Location Services on.
I also tested Google Map application installed, Google Map application can get current location.
I also have tested if I change the time out value
Location location = provider.getLocation(-1);
The program running forever without getting the current latitude location.
If I change the criteria to be :
Criteria csCriteria = new Criteria();
It can return the current location but this is not what I am looking for ( I want to get current location based on GPS only).
I read previous postings in forum and got no solution for this.
Does any know know what's wrong with this ?
Thank you very much.
04-10-2012 12:14 PM
We need to clarify one thing.
You use Google Maps to demonstrate that it should be possible to find your GPS location. But I would be confident that Google is not using your GPS to find the location, especially if it comes back quickly. It will probably be using CellSite and WiFi. Why do you think that Google Maps finding your location is a demonstration that GPS should work?
With respect to your problem, I suspect the problem here is that in fact your device can't find a true GPS location. To confirm this, go into Options --> Device --> Location Settings. Make sure the GPS Data source is "Device GPS" and use the menu to refresh Location. I'm betting it does not find a location. If it does find a location and the number of satellites is 0, then this is a Cell Site location not GPS.
04-11-2012 06:24 AM
Hi Peter, you are right.
>To confirm this, go into Options --> Device --> Location Settings. Make sure the GPS Data source is "Device GPS" >and use the menu to refresh Location. I'm betting it does not find a location. If it does find a location and the number >of satellites is 0, then this is a Cell Site location not GPS.
The number of satelites is 0. I have just known about it.
I assume Google Map application uses GPS not cellsite because it can display route to any place. According to what I read, Cellsite information cannot display route to any place.
If Google Map application uses cellsite as what you said, how to show/get route to a place using cell site ?
Thank you very much.
04-11-2012 06:50 AM
I am not sure I follow your logic here.
A CellSite Location is a location. A GPS Location is a location. The only difference is the source of the location, the location can be used in the same way.
"According to what I read, Cellsite information cannot display route to any place."
Where have your read this? Perhaps your interpretation is not correct so if we can read it we might be able to clear up any misunderstanding. .
04-11-2012 07:03 AM
Thank you Peter, this is what I read:
The Cell Site mode determines the location of the device solely based on cell tower
locations and signal strengths. This provides only location, not speed or other route
information. The accuracy is generally poor. Unlike the real GPS methods, it is
I interpreted "other route information" as getting direction.
What does "other route information" mean ?
04-12-2012 04:50 AM
In this situation I would be confident that the route information that is lacking is things like is direction or bearing. I do not think this means you can't use a Cell Site Location for planing a route between where you are (aprproximately in the case of Cell Site) and where you want to go.