BlackBerry Developer Blog

Locate Service Update Provides GPS-Free Location Queries

Ever wondered how to query for location without being dependent on GPS? Well, look no more: we’ve introduced a brand-new feature that is capable of getting you a location fix in seconds using nearby cell tower information. The new Geolocation service is now part of the Locate Service. The best part? It’s free to developers!

Users can be indoors with no GPS coverage, but your app will still be able to guide them to restaurants or points of interest (POI) around them. Although the accuracy of the fixes obtained from the Geolocation service may not always be as high as with GPS, it has use cases for apps that require highly accurate GPS fixes as well as apps that do not. Apps that require high accuracy can use this service to quickly show the user an approximate location while it waits for a more accurate location fix using GPS. This can offer a huge user experience improvement. For applications that do not require high accuracy, this service can be leveraged as a simple yet effective mechanism to provide location information.

To take advantage of the Geolocation service, you simply need to ask for a location fix via your LocationProvider or BlackBerryLocationProvider using the appropriate Criteria, or BlackBerryCriteria for the Cellsite mode. It is important to note that this service requires BlackBerry® Application Platform v5.0 or higher and users must be signed up with a carrier that has enabled these capabilities.

You can also consider combining the Locate Service with the BlackBerry® Maps Service to offer a variety of features from navigation directions to POIs. The BlackBerry Maps Service complements the Locate Service by providing map displays that can be invoked or embedded to indicate a user’s location. Please refer to net.rim.device.api.lbs.MapField class and the net.rim.blackberry.api.invoke package for details on APIs related to Map Service.

In BlackBerry Device Software, we’ve also enhanced the existing Geocoding functionality provided by the Locate Service. Using the net.rim.device.api.lbs.Locator class, you can now ask for reverse geocoding in addition to the geocoding functionality we already offered. Reverse geocoding is capable of converting latitude and longitude to a meaningful address. One of my favorite features of the new reverse geocoding functionality is that you can ask for contextual location information at a variety of levels from the street address to the state depending on the granularity required by your application. As a developer, you are able to take advantage of this service with a single method call while we do all the heavy lifting behind the scene.

These new features and capabilities are a great extension of all the work we did within the last year on our location-based services environment. In BlackBerry Application Platform v5.0, we introduced an extension API to the standard Location API (JSR 179). This extension API is much easier to work with and creates new opportunities for all application developers to leverage location within their apps. Please refer to the net.rim.device.api.gps package in the API documentation.

In addition to the extension API, we introduced a set of flexible Location Picker UI components that integrate seamlessly with the BlackBerry Maps and Contacts applications as well as with the GPS capabilities of the device. Check out the net.rim.device.api.lbs.picker package in the API documentation for more information.

The combination of the Locate and Maps Services opens the door to contextualized and location-aware applications that go above and beyond what is available today. We are very excited to hear your feedback on these new capabilities and how you plan on using them within your application.