Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 68
Registered: ‎10-26-2008
My Device: Not Specified

GPS on Bold

[ Edited ]

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....

Message Edited by MRJAVA on 04-15-2009 06:07 PM
Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: GPS on Bold

Try requesting the default location provider (pass a null instead of a Criteria to getInstance).

 

 

 

Developer
Posts: 68
Registered: ‎10-26-2008
My Device: Not Specified

Re: GPS on Bold

Same result. Anything else?

 

Btw, does the BOLD support Cellsite/Wi-fi GPS? I don't understand why GoogleMaps is so fast... 

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: GPS on Bold

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.

 

 

 

 

Developer
Posts: 68
Registered: ‎10-26-2008
My Device: Not Specified

Re: GPS on Bold

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!!!

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: GPS on Bold

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!

 

 

 

 

 

Developer
Posts: 68
Registered: ‎10-26-2008
My Device: Not Specified

Re: GPS on Bold

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?

Highlighted
New Developer
Posts: 22
Registered: ‎07-17-2008
My Device: Not Specified

Re: GPS on Bold

There is a 3rd party library called navizon that implements cell site lookup.  It is very unreliable.  I can' tell whether that is becuase their database is sparse or the software on the device is flaky.  I do not recommend it.
Developer
Developer
Posts: 319
Registered: ‎07-20-2008
My Device: Not Specified

Re: GPS on Bold

[ Edited ]

See this link...

 

http://www.anddev.org/poor_mans_gps_-_celltowerid_-_location_area_code_-lookup-t257.html

 

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.

 

Message Edited by gtj on 04-15-2009 08:27 PM
Developer
Posts: 68
Registered: ‎10-26-2008
My Device: Not Specified

Re: GPS on Bold

Hi gtj,

 

before I start hacking around with this secret Google Api, can you verify that this works? Does it work consistently?