04-15-2009 05:58 PM - last edited on 04-15-2009 06:07 PM
Hi,
can anyone tell me how long the LocationProvider/Location classes should take to return the GPS location on the Bold? I have the following code which returns SOMETIMES after 10 min even though timeout is set to 30 sec. Am I doing anything wrong here? Is Bold just THAT slow and unreliable when it comes to GPS? Also, what alternatives are there to the method below? I see that GoogleMaps is blazing fast compared to my app. What are they using? Cellsite?
LocationProvider LP;
Location L;
QualifiedCoordinates qc
Criteria C = new Criteria();
C.setPreferredResponseTime(30);
LP = LocationProvider.getInstance(C);
int state = LP.getState(); // returns 1 - OK
L = LP.getLocation(30);
qc = L.getQualifiedCoordinates();
One more point of interest, the qc parameter will often return 0 for both getLongitude() and getLatitude() even if everything else comes back as OK(i.e. nothing is returned as null, and L.isValid() is true).
Using BOLD, Rogers Wireless, software version 4.6.0.162 - as usual, code works great on simulator.
OH, and one more thing. Shouldn't I get an Exception thrown after my 30sec timeout is surpassed? I am not seeing any Exceptions, just a hang....
04-15-2009 06:23 PM
Try requesting the default location provider (pass a null instead of a Criteria to getInstance).
04-15-2009 06:26 PM
Same result. Anything else?
Btw, does the BOLD support Cellsite/Wi-fi GPS? I don't understand why GoogleMaps is so fast...
04-15-2009 06:35 PM
Google maps uses its own cell-site mapping.
On our lab Bold (AT&T), the first fix for GPS takes forever indoors, and often fails - even in a frame building. In a concrete/steel structure, forgetaboutit!
It takes perhaps 2-3 minutes outdoors. This is as good as it gets, in my experience.
There is no "network assist" mode on the Bold (AFAIK) only stand-alone. So you'll never get those "instant" fixes.
04-15-2009 06:40 PM
Wait, so how can GoogleMaps use cell-site mapping when the Bold has only stand-alone capabilities?
Is there a way to get the GPS location quickly? Apps using GPS would be pretty useless if it took 2-3 minutes to get a GPS location AND if the feature did not work indoors at all. Imagine writing an app that lets you do a store search -if you can only use it when you're outdoors, and if it takes 2 minutes to update, its pretty useless!!!
04-15-2009 07:09 PM
As I stated earlier, Google uses their own cell-site mapping database. They hit their own servers with the ID of the site and get the location. It's fast, but not very accurate, and it has nothing to do with the GPS or with the carrier. I imagine (but I'm not certain) that other folks have built cell-site locator databases, besides google. You might find one out there if you look around.
The performance - that is the reality of GPS, sorry. If you don't have line-of-sight to at least 3 satellites, it just ain't happening in autonomous mode. The Storm device seems to be much better, but that is based on non-scientific observation.
Anyway, that's just my opinion. Your mileage may vary!
04-15-2009 07:20 PM
So they get device location, in relation to cell towers from the BB api somehow?
Has anybody out there built an app that uses one of these cell site DBs? Any tips/code samples?
04-15-2009 09:55 PM
04-15-2009 10:26 PM - last edited on 04-15-2009 10:27 PM
See this link...
http://www.anddev.org/poor_mans_gps_-_celltowerid_
and I use that method in my SignalLoc app.
http://f5bbutils.fairview5.com/signalloc
Oh, and it returns cell site location, not the device location.
04-15-2009 11:51 PM
Hi gtj,
before I start hacking around with this secret Google Api, can you verify that this works? Does it work consistently?