CAMOBAP
CAMOBAP

Reputation: 5657

Blackberry - GPS vs Geolocation - how to select the best?

Does Blackberry API provide any methods to determine which one, GPS or Geolocation is better in current situation (according to signal level, network bandwidth and any other environment properties)?

Upvotes: 0

Views: 257

Answers (1)

Nate
Nate

Reputation: 31045

There's many, many different algorithms you could use to determine which is the optimal location mode to use.

A well-tuned algorithm would have to account for things like

  • how fast does your user need a location fix?
  • how accurate does the fix need to be? is it just being used to find nearby movie theatres, or is the fix used for navigation (which needs to be really accurate)?
  • which mobile carrier are you on? GPS results may be independent of the carrier, but other geolocation technologies will depend on the carrier, and their infrastructure (assuming you're using the cellular network, and not Wi-Fi)
  • is there any reason to need to limit network transmissions (e.g. for a metered data plan, where you are frequently updating the location)?
  • how important is battery usage?
  • which BlackBerry OS versions are you targeting?

I'm sure I'm missing some other factors, but hopefully you can see that it's not a simple problem that can be solved without knowing something about your app and network deployment.

Also, this kind of algorithm for BlackBerry (Java) apps has traditionally taken a lot of work to optimize. As such, many developers (or clients) would consider this a closely-guarded business secret. So, it might be hard to find someone to publish their algorithm (but it doesn't hurt to ask, right?).

That said, you might at least take a look at the BlackBerry Simple Location API, which is an open source implementation of a basic algorithm that selects between GPS and Geolocation modes (if you allow it to use both). From the Javadocs (for the Optimal mode):

Operates in both Geolocation and GPS mode based on availability. First fix is computed in Geolocation mode, subsequent fixes in Standalone mode. However if Standalone mode fails, falls back to Geolocation mode temporarily until a retry is attempted in Standalone mode after a certain waiting period has passed. See setRetryFactor(int).

For single fix calls to getLocation(int), Geolocation mode is used first with a fallback to Standalone mode if Geolocation mode fails.

I see you're in Belarus, but I don't know where your clients, or users are. If they're in the US, you may also need to consider something like Nav Builder Inside for geolocation if your app will support the Verizon network.

Anyway, I know this probably isn't the answer you wanted, but maybe it's a start?

Upvotes: 4

Related Questions