Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
12-03-2008 02:27 PM
I'm just curious about the default GPS mode used when no criteria is specified.
I'm using LocationProvider.getInstance(null) instead of specifying a critera.
I saw the table with all default values here:
I understand that the default values are always the least restrictive options... but was wondering which GPS mode (Autonomous, Assisted, Cellsite) is used when all values at the least restrictive?
Is it always the same mode? Or is the mode chosen automaticaly by the implementation each time based on some logic?
I'm just trying to fully understand all this.
12-04-2008 02:02 PM
Based on the API table that is provided: http://www.blackberry.com/developers/docs/4.2.1api
The criteria, when at default will use the Assisted Location Provider. You can see this because when the horizontal/vertical accuracy is at it's default (no requirement), the cost is at its default (true), and the power consumption is at its default (no requirement), the resulting mode in the table is Assisted.
From my tests of using the GPS, this has held true for my own applications. Without any criteria, it's always Assisted. The problem I'm having is trying to get it to the Autonomous mode.
12-04-2008 04:52 PM
OK, I just wasn't sure that, for example, if the cost is not specified (default to true), the implementation would automaticaly force the cost flag to be true and don't use other modes that have the cost flag set to false... or it would use modes that has either value since the cost is not specified.
Just out of curiosity, what problems are you having using the Autonomous mode?
12-04-2008 05:17 PM - edited 12-04-2008 05:31 PM
Well, I haven't been able to get the Criteria set such that it makes the LocationProvider work in Autonomous mode. It's always going to Assisted mode. The way I'm testing this is by calling the phone while trying to use the GPS. Only Autonomous mode will allow the LocationProvider to aquire coordinates while in a call.
On a side note, does anyone know how to truly see what mode the GPS is working in? I have seen it done in other software, but don't see how to implement it.
12-08-2008 02:03 PM
There is currently no API to query for this. Note that not every BlackBerry model supports autonomous mode. The following chart lists the supported modes for different BlackBerry models.
What Is - The BlackBerry smartphone models and their corresponding GPS capabilities
Article Number: DB-00615
I also recommend looking at this link.
How To - Manage simultaneous GPS and phone usage on the BlackBerry 8703e and 7130e smartphones
Article Number: DB-00611
12-08-2008 02:11 PM
Thank you for your links Mark. Your responses are always informative and appreciated.
I'm currently testing this on two different BlackBerries, both of which have true GPS on them (8310 and 9000). However, our service provider is not a US provider, so I cannot check on the chart. We areinvestigating whether or not there is a block on the Autonomous GPS like some US carriers do unless you pay for their additional services.
The ability to get a GPS fix during a phone call is actually not a priority for us, and not a problem. The only reason I was doing that was to test whether or not it was a true Autonomous GPS mode that was on.
12-08-2008 03:16 PM
I just did a test with my Blackberry Curve 8330 with Bell Canada.
I'm getting a GPS coordinates every 15 minutes using .getLocation() combined with a timer (I'm not using LocationListener).
I called my Blackberry with my other phone one minute before the next .getLocation()... and waited about 10 minutes.
I didn't receive any GPS coordinates.
However, as soon as I hung up the phone, I received my GPS coordinates.
If I understand correctly, that means I was able to get a GPS coordinates while on the phone... but the Blackberry was not able to send it yet cause the line was busy... but somehow managed to queue my network connection (http) and then sent it the second after the line was free.
Does that mean my GPS is working with the "Autonomous" mode?
12-08-2008 03:32 PM
That's an interesting take on what's happening. I did not really consider that. In my application, the BlackBerry is sending the coordinates back via a socket connection. Would a phone call block the socket connection?
If that's the case, I cannot rule out Autonomous GPS being used, because I also have similar circumstances where as soon as I hang up, the coordinates come back (usually about 5 seconds after).
How are you communicating back to your server application canamgroup?
12-08-2008 03:46 PM
Based on my tests, a phone call seems to block every network connections.
For instance, I tried to send an e-mail to my Blackberry while on the phone and I get it only when I hang up.
To communicate with my server, I'm using a HttpConnection :HttpConnection con = (HttpConnection)Connector.open(URL); // open URL connection
12-08-2008 03:52 PM
I think it's very possible that it's autonomous mode. Check what kind of accuracy you are getting. I know that on my application, I'm getting back coordinates that are within 5 metres accuracy in both horizontal and vertical aspects. And I am starting to think that this has got to be autonomous mode.