Professional Documents
Culture Documents
Location-Based Services
Version: 5.0
Development Guide
Published: 2010-04-06
SWD-863631-0401094559-001
Contents
1 GPS overview................................................................................................................................................................................ 4
6 BlackBerry Maps.......................................................................................................................................................................... 46
Opening BlackBerry Maps from your application....................................................................................................................... 46
Open BlackBerry Maps by using the default settings................................................................................................................ 46
Open BlackBerry Maps by using information from a contact................................................................................................... 47
Open BlackBerry Maps by using specific coordinates................................................................................................................ 49
Open BlackBerry Maps by using a landmark............................................................................................................................... 50
Opening BlackBerry Maps by using a location document......................................................................................................... 52
XML element: <lbs>................................................................................................................................................................ 52
XML element: <location>....................................................................................................................................................... 53
XML element: <getRoute>..................................................................................................................................................... 55
Display and clear locations on a map by using a location document.............................................................................. 55
Display and clear a route on a map by using a location document................................................................................. 57
Open BlackBerry Maps by using a local search.......................................................................................................................... 59
Using KML documents with BlackBerry Maps............................................................................................................................ 60
Supported KML elements...................................................................................................................................................... 60
Create a basic KML document.............................................................................................................................................. 61
Displaying KML overlays on BlackBerry Maps.................................................................................................................... 61
Invoke BlackBerry Maps by using a KML document.......................................................................................................... 62
Opening BlackBerry Maps from the BlackBerry Browser........................................................................................................... 63
Retrieving a GPS location by using a web page.......................................................................................................................... 63
Retrieve a GPS location by using a web page............................................................................................................................. 65
Embedding a map in an application............................................................................................................................................. 66
Embed a map in an application............................................................................................................................................ 67
7 Glossary......................................................................................................................................................................................... 73
8 Provide feedback......................................................................................................................................................................... 74
GPS overview 1
You can allow a BlackBerry® device application to retrieve the GPS location of a BlackBerry device. The values for the location
information are returned as the coordinates for latitude, longitude, and altitude.
The GPS mode that you specify to retrieve the location information depends on the type of application that you want to develop.
The GPS modes include the autonomous mode, assisted mode, and cell site mode. The GPS mode can affect the initial speed of
a GPS fix and the level of location accuracy. For example, a weather application might specify a cell site mode, which can quickly
provide an approximate location. For more information about the BlackBerry device models and their available corresponding
GPS modes, visit http://www.blackberry.com/knowledgecenterpublic/ to read article DB-00615.
To retrieve location information, you can use the JSR 179 Location API for Java® ME in the
javax.microedition.location package, or the BlackBerry extension to JSR 179 in the
net.rim.device.api.gps package.
The JSR 179 Location API for Java MEis supported on BlackBerry devices that run BlackBerry® Device Software 4.0.2 or later.
The BlackBerry extensions to JSR 179 is supported on BlackBerry devices that run BlackBerry Device Software 5.0.0 or later.
Retrieving the GPS location of a BlackBerry device involves the following actions:
• Specifying the GPS mode
• Retrieving a location provider
• Making a GPS request that is based on the frequency of the GPS fix
• Retrieving the GPS location of a BlackBerry device
Code sample: Specifying the GPS mode
/* JSR 179 */
Criteria myCriteria = new Criteria();
Code sample: Making a GPS request that is based on the frequency of the GPS fix
/*
* Single GPS fix
*/
/* JSR 179 */
4
Development Guide GPS overview
/*
* Continuous GPS fixes
*/
/* JSR 179 */
myProvider.setLocationListener(…);
5
Development Guide Specifying the GPS mode
6
Development Guide Specifying the GPS mode by using JSR 179
myCriteria.setVerticalAccuracy(Criteria.NO_REQUIREMENT);
myCriteria.setCostAllowed(true);
break;
case 1: // ASSIST
myCriteria.setPreferredPowerConsumption(Criteria.POWER_USAGE_MEDIUM);
myCriteria.setHorizontalAccuracy(100);
myCriteria.setVerticalAccuracy(100);
myCriteria.setCostAllowed(true);
break;
case 2: // AUTONOMOUS
myCriteria.setCostAllowed(false);
break;
}
7
Development Guide Specifying the GPS mode by using BlackBerry extensions to JSR 179
Method Description
setMode (int) You can use this method to specify an initial GPS mode when you create a
BlackBerryCriteria object.
setFailoverMode (int, int, int) You can use this method to specify a GPS failover mode to use when the initial
GPS mode is unsuccessful. This method applies only to the internal GPS
functionality on a BlackBerry device.
setSubsequentMode (int) You can use this method to specify a subsequent GPS mode to use after a
successful first GPS fix is retrieved.
setGPSRestartInterval (int, You can use this method to specify an interval to wait before automatically
int) restarting the GPS retrieval process when a GPS fix is not successfully retrieved.
You can specify intervals to a maximum of 15 minutes and a minimum of 2 seconds,
with a limit of three automatic retries.
setSatelliteInfoRequired You can use this method to specify whether you want satellite tracking
(boolean, boolean) information. The satellite tracking information consists of the number of satellites
in view, and their IDs, signal quality, elevation, and azimuth. This applies only to
the internal GPS functionality on a BlackBerry device.
GPS Modes
Your BlackBerry® device application must verify that a GPS mode is available for use on each BlackBerry device that your
application runs on, before your application can use the GPS mode.
8
Development Guide Specifying the GPS mode by using BlackBerry extensions to JSR 179
9
Development Guide
public handleGPS()
{
}
}
3. In the constructor, create a try/catch block. In this block, create an instance of the BlackBerryCriteria class by
passing the GPS mode as a parameter to the constructor.
try
{
myCriteria = new BlackBerryCriteria(GPSInfo.GPS_MODE_ASSIST);
}
catch ( UnsupportedOperationException ex )
{
return;
}
4. In the constructor, invoke setFailloverMode() to specify the GPS failover mode to use if the first GPS mode that you
specify cannot retrieve a GPS fix. Invoke setSubsequentMode() to specify a subsequent GPS mode to use after a
successful first fix is retrieved.
myCriteria.setFailoverMode(GPSInfo.GPS_MODE_AUTONOMOUS, 3, 100);
myCriteria.setSubsequentMode(GPSInfo.GPS_MODE_AUTONOMOUS);
5. To verify if a GPS mode is supported, invoke GPSInfo.isGPSModeAvailable() and pass the GPS mode as a
parameter. Invoke setMode() to specify the GPS mode, if the mode is supported.
public class handleGPS
{
public handleGPS()
{
BlackBerryCriteria myCriteria = new BlackBerryCriteria();
if (GPSInfo.isGPSModeAvailable(GPSInfo.GPS_MODE_ASSIST))
myCriteria.setMode(GPSInfo.GPS_MODE_ASSIST);
else if (GPSInfo.isGPSModeAvailable(GPSInfo.GPS_MODE_AUTONOMOUS))
myCriteria.setMode(GPSInfo.GPS_MODE_AUTONOMOUS);
}
}
10
Development Guide Retrieving location information by using the assisted GPS mode
11
Development Guide Retrieving location information by using the assisted GPS mode
public handleGPS()
{
}
}
3. In the constructor, create and start an instance of the Thread class.
gpsThread = new GPSThread();
gpsThread.start();
4. In the class, create a private static class that extends Thread, and create a run() method.
private static class GPSThread extends Thread
{
public void run()
{
}
}
5. In the run() method of the private class, invoke isGPSModeAvailable() passing GPS_MODE_ASSIST as a
parameter to determine if the assisted mode is available on the BlackBerry® device. Invoke isPDEInfoRequired() to
determine if you need to specify PDE server information. If PDE server information is required, create an instance of the
BlackBerryCriteria class by passing GPS_MODE_ASSIST as a parameter to the constructor.
if ( !GPSInfo.isGPSModeAvailable(GPSInfo.GPS_MODE_ASSIST) ||
!GPSSettings.isPDEInfoRequired(GPSInfo.GPS_MODE_ASSIST))
return;
12
Development Guide Retrieving location information by using the assisted GPS mode
try
{
BlackBerryLocation myLocation =
(BlackBerryLocation)myProvider.getLocation(10);
}
catch ( InterruptedException iex )
{}
catch ( LocationException lex )
{}
}
catch ( LocationException lex )
{}
return;
public handleGPS()
{
gpsThread = new GPSThread();
gpsThread.start();
}
BlackBerryCriteria myCriteria =
new BlackBerryCriteria(GPSInfo.GPS_MODE_ASSIST);
try
{
BlackBerryLocationProvider myProvider =
(BlackBerryLocationProvider)
LocationProvider.getInstance(myCriteria);
String user = "UserID";
String pass = "Password";
String ip = "127.0.0.1";
int port = 0;
13
Development Guide Retrieving location information by using the assisted GPS mode
try
{
BlackBerryLocation myLocation =
(BlackBerryLocation)myProvider.getLocation(10);
}
catch ( InterruptedException iex )
{
return;
}
catch ( LocationException lex )
{
return;
}
}
catch ( LocationException lex )
{
return;
}
return;
}
}
}
14
Development Guide Retrieving a location provider
switch ( myMode )
{
case 0: // CELLSITE
15
Development Guide Retrieve a location provider by using the LocationProvider class
myCriteria.setPreferredPowerConsumption(Criteria.POWER_USAGE_LOW);
myCriteria.setHorizontalAccuracy(Criteria.NO_REQUIREMENT);
myCriteria.setVerticalAccuracy(Criteria.NO_REQUIREMENT);
myCriteria.setCostAllowed(true);
break;
case 1: // ASSIST
myCriteria.setPreferredPowerConsumption(Criteria.POWER_USAGE_MEDIUM);
myCriteria.setHorizontalAccuracy(100);
myCriteria.setVerticalAccuracy(100);
myCriteria.setCostAllowed(true);
break;
case 2: // AUTONOMOUS
myCriteria.setCostAllowed(false);
break;
}
5. In the constructor, create a try/catch block. Within the block, create a LocationProvider object by invoking
getInstance().
try
{
LocationProvider myProvider =
LocationProvider.getInstance(myCriteria);
}
catch ( LocationException lex )
{
return;
}
switch ( myMode )
{
case 0: // CELLSITE
myCriteria.setPreferredPowerConsumption(Criteria.POWER_USAGE_LOW);
myCriteria.setHorizontalAccuracy(Criteria.NO_REQUIREMENT);
myCriteria.setVerticalAccuracy(Criteria.NO_REQUIREMENT);
myCriteria.setCostAllowed(true);
break;
16
Development Guide Controlling location tracking by using the BlackBerryLocationProvider class
case 1: // ASSIST
myCriteria.setPreferredPowerConsumption(Criteria.POWER_USAGE_MEDIUM);
myCriteria.setHorizontalAccuracy(100);
myCriteria.setVerticalAccuracy(100);
myCriteria.setCostAllowed(true);
break;
case 2: // AUTONOMOUS
myCriteria.setCostAllowed(false);
break;
}
try
{
LocationProvider myProvider = LocationProvider.getInstance(myCriteria);
}
catch ( LocationException lex )
{
return;
}
}
}
Method Description
getProviderType() This method retrieves the source of the location information. The source is either an
internal or external GPS receiver.
pauseLocationTracking (int This method pauses location tracking and stops receiving GPS fixes. You can pass
interval) an interval parameter, specified in seconds, to make sure that the GPS receiver
remains active during the pause interval. You can pass an interval of 0 to indefinitely
stop location tracking and make the GPS receiver inactive.
resumeLocationTracking() This method resumes location tracking after it is in a paused state.
stopLocationTracking() This method stops location tracking only if tracking was previously started. Your
application must invoke BlackBerryLocationProvider.reset() before it
restarts location tracking by using the same location provider.
17
Development Guide Control location tracking by using the BlackBerryLocationProvider class
public handleGPS()
{
}
}
3. In the constructor, create a try/catch block. In the block, create an instance of the BlackBerryCriteria class by
passing the GPS mode as a parameter to the constructor.
try
{
BlackBerryCriteria myCriteria =
new BlackBerryCriteria(GPSInfo.GPS_MODE_AUTONOMOUS);
}
catch ( UnsupportedOperationException uoex )
{
return;
}
4. In the try part of the block, create a new try/catch block. In this block, create an instance of the
BlackBerryLocationProvider class by retrieving an instance of the BlackBerryCriteria class. Invoke
setLocationListener() by passing the interval value, timeout value, and maximum age as parameters to add a
LocationListener.
try
{
myProvider = (BlackBerryLocationProvider)
LocationProvider.getInstance(myCriteria);
myProvider.setLocationListener(new handleGPSListener(), 10, -1, -1);
}
catch ( LocationException lex )
{
return;
}
18
Development Guide Control location tracking by using the BlackBerryLocationProvider class
myProvider.pauseLocationTracking(30);
myProvider.resumeLocationTracking();
myProvider.stopLocationTracking();
5. Outside of the try/catch block, invoke pauseLocationTracking(), resumeLocationTracking(), or
stopLocationTracking() to pause, resume, or stop location tracking.
myProvider.pauseLocationTracking(30);
myProvider.resumeLocationTracking();
myProvider.stopLocationTracking();
6. In the class, implement the LocationListener interface. Implement the basic framework for the locationUpdated
() method, and the providerStateChanged() method.
public static class handleGPSListener implements LocationListener
{
public void locationUpdated(LocationProvider provider, Location location)
{
if (location.isValid())
{}
else
{}
}
public handleGPS()
{
try
{
BlackBerryCriteria myCriteria =
new BlackBerryCriteria(GPSInfo.GPS_MODE_AUTONOMOUS);
19
Development Guide Control location tracking by using the BlackBerryLocationProvider class
try
{
myProvider = (BlackBerryLocationProvider)
LocationProvider.getInstance(myCriteria);
myProvider.setLocationListener(new handleGPSListener(), 10, -1, -1);
}
catch ( LocationException lex )
{
return;
}
myProvider.pauseLocationTracking(30);
myProvider.resumeLocationTracking();
myProvider.stopLocationTracking();
}
catch ( UnsupportedOperationException uoex )
{
return;
}
return;
}
20
Development Guide Retrieve a location provider by using the BlackBerryLocationProvider class
}
}
}
public handleGPS()
{
}
}
3. In the constructor, create a try/catch block. In the block, create an instance of the BlackBerryCriteria class and
pass the GPS mode to the constructor. Create a second try/catch block, then create an instance of the
BlackBerryLocationProvider class by invoking getInstance() to retrieve an instance of the
BlackBerryCriteria object.
try
{
myCriteria = new BlackBerryCriteria(GPSInfo.GPS_MODE_ASSIST);
try
{
BlackBerryLocationProvider myProvider =
(BlackBerryLocationProvider)
LocationProvider.getInstance(myCriteria);
}
catch ( LocationException lex )
{
return;
}
}
catch ( UnsupportedOperationException ex )
{
return;
}
}
}
21
Development Guide Retrieving the location of a BlackBerry device
22
Development Guide Retrieve the location of a BlackBerry device
7. In the run() method, create a try/catch block. In the block create a LocationProvider object by getting an
instance of the Criteria object. Create another try/catch block to create a Location object to request the current
location of the BlackBerry® device and specify the timeout period in seconds. When the getLocation() method returns,
request the latitude and longitude coordinates.
try
{
LocationProvider myLocationProvider =
LocationProvider.getInstance(myCriteria);
try
{
Location myLocation = myLocationProvider.getLocation(300);
latitude = myLocation.getQualifiedCoordinates().getLatitude();
longitude = myLocation.getQualifiedCoordinates().getLongitude();
}
catch ( InterruptedException iex )
{
return;
}
catch ( LocationException lex )
{
return;
}
}
catch ( LocationException lex )
{
return;
}
return;
public handleGPS()
{
gpsThread = new GPSThread();
gpsThread.start();
}
23
Development Guide Retrieve the location of a BlackBerry device by specifying continuous fix requests
try
{
LocationProvider myLocationProvider =
LocationProvider.getInstance(myCriteria);
try
{
Location myLocation = myLocationProvider.getLocation(300);
latitude = myLocation.getQualifiedCoordinates().getLatitude();
longitude = myLocation.getQualifiedCoordinates().getLongitude();
}
catch ( InterruptedException iex )
{
return;
}
catch ( LocationException lex )
{
return;
}
}
catch ( LocationException lex )
{
return;
}
return;
}
}
}
24
Development Guide Retrieve the location of a BlackBerry device by specifying continuous fix requests
{
}
}
3. In the constructor, create an instance of the Criteria class. Create a try/catch block. In this block, create an instance of
the LocationProvider class by invoking getInstance() and using the Criteria object. Invoke
setLocationListener() to specify the location of the GPS event listener.
Criteria myCriteria = new Criteria();
try
{
LocationProvider provider = LocationProvider.getInstance(myCriteria);
provider.setLocationListener(new handleGPSListener(), 10, -1, -1);
}
catch ( LocationException lex )
{
return;
}
4. In the class, implement the LocationListener interface. You must add functionality as required to this implementation.
public static class handleGPSListener implements LocationListener
{
public void locationUpdated(LocationProvider provider, Location location)
{
if (location.isValid())
{
// do something
}
else
{
// invalid locatuon
}
}
25
Development Guide Retrieve the location of a BlackBerry device by specifying continuous fix requests
Code sample: Retrieving the GPS location of a BlackBerry device by using continuous fix
requests
import javax.microedition.location.*;
try
{
LocationProvider provider = LocationProvider.getInstance(myCriteria);
provider.setLocationListener(new handleGPSListener(), 10, -1, -1);
}
catch ( LocationException lex )
{
return;
}
}
26
Development Guide Retrieving location information by using the Location class
}
}
}
27
Development Guide Retrieving location information by using the Location class
try
{
Location myLocation = myLocationProvider.getLocation(300);
latitude = myLocation.getQualifiedCoordinates().getLatitude();
longitude = myLocation.getQualifiedCoordinates().getLongitude();
velocity = myLocation.getSpeed();
heading = myLocation.getCourse();
timeStamp = myLocation.getTimestamp();
nmeaString = myLocation.getExtraInfo
("application/X-jsr179-location-nmea");
}
catch ( InterruptedException iex )
{}
catch ( LocationException lex )
{}
}
catch ( LocationException lex )
{}
return;
28
Development Guide Retrieving location information by using the Location class
Code sample: Using the Location class to retrieve GPS location information
import javax.microedition.location.*;
public handleGPS()
{
gpsThread = new GPSThread();
gpsThread.start();
}
try
{
LocationProvider myLocationProvider =
LocationProvider.getInstance(myCriteria);
try
{
Location myLocation = myLocationProvider.getLocation(300);
latitude = myLocation.getQualifiedCoordinates().getLatitude();
longitude = myLocation.getQualifiedCoordinates().getLongitude();
velocity = myLocation.getSpeed();
heading = myLocation.getCourse();
timeStamp = myLocation.getTimestamp();
nmeaString = myLocation.getExtraInfo
("application/X-jsr179-location-nmea");
}
catch ( InterruptedException iex )
{
return;
}
catch ( LocationException lex )
{
29
Development Guide Retrieving location information by using the BlackBerryLocation class
return;
}
}
catch ( LocationException lex )
{
return;
}
return;
}
}
}
30
Development Guide Retrieving location information by using the BlackBerryLocation class
try
{
BlackBerryLocationProvider myProvider =
(BlackBerryLocationProvider)LocationProvider.getInstance(myCriteria);
7. Create a third try/catch block that is in the first try/catch block. Create a BlackBerryLocation object to retrieve
the GPS fix including a 300 second timeout expiry. Populate the fields and extract the satellite information into a
StringBuffer object.
try
{
BlackBerryLocation myLocation =
(BlackBerryLocation)myProvider.getLocation(300);
satCount= myLocation.getSatelliteCount();
signalQuality = myLocation.getAverageSatelliteSignalQuality();
dataSource = myLocation.getDataSource();
gpsMode = myLocation.getGPSMode();
SatelliteInfo si;
StringBuffer sb = new StringBuffer("[Id:SQ:E:A]\n");
String separator = ":";
31
Development Guide Retrieving location information by using the BlackBerryLocation class
public handleGPS()
{
gpsThread = new GPSThread();
gpsThread.start();
}
try
{
BlackBerryLocationProvider myProvider =
(BlackBerryLocationProvider)
LocationProvider.getInstance(myCriteria);
32
Development Guide
try
{
BlackBerryLocation myLocation =
(BlackBerryLocation)myProvider.getLocation(300);
satCount= myLocation.getSatelliteCount();
signalQuality =
myLocation.getAverageSatelliteSignalQuality();
dataSource = myLocation.getDataSource();
gpsMode = myLocation.getGPSMode();
SatelliteInfo si;
StringBuffer sb = new StringBuffer("[Id:SQ:E:A]\n");
String separator = ":";
return;
}
}
}
33
Development Guide Change the criteria to receive location information
if ( gpsMode == GPSInfo.GPS_MODE_AUTONOMOUS )
{
myCriteria.setCostAllowed(false);
}
else if ( gpsMode == GPSInfo.GPS_MODE_ASSIST )
{
myCriteria.setPreferredPowerConsumption(Criteria.POWER_USAGE_MEDIUM);
}
else
34
Development Guide Change the criteria to receive location information
{
myCriteria.setPreferredPowerConsumption(Criteria.POWER_USAGE_LOW);
}
6. In the constructor, create a try/catch block. In this block, create an instance of the LocationListener class by
invoking getInstance() and passing the Criteria object as a parameter. Specify a location listener to handle the
GPS location updates.
try
{
locationProvider = LocationProvider.getInstance(myCriteria);
if (locationProvider != null)
{
locationProvider.setLocationListener
(new myLocationListener(), -1, -1, -1);
}
}
catch (Exception err)
{}
7. In the class, create a private static class that implements the LocationListener interface. Retrieve the current location
information in the locationUpdated() method. Create a basic implementation of the providerStateChanged
() method to monitor the LocationProvider state.
private static class myLocationListener implements LocationListener
{
public void locationUpdated(LocationProvider provider, Location location)
{
lat = location.getQualifiedCoordinates().getLatitude();
lon = location.getQualifiedCoordinates().getLongitude();
alt = location.getQualifiedCoordinates().getAltitude();
spd = location.getSpeed();
crs = location.getCourse();
}
35
Development Guide Change the criteria to receive location information
if ( gpsMode == GPSInfo.GPS_MODE_AUTONOMOUS )
{
myCriteria.setCostAllowed(false);
}
else if ( gpsMode == GPSInfo.GPS_MODE_ASSIST )
{
myCriteria.setPreferredPowerConsumption(Criteria.POWER_USAGE_MEDIUM);
}
else
{
myCriteria.setPreferredPowerConsumption(Criteria.POWER_USAGE_LOW);
}
try
{
locationProvider = LocationProvider.getInstance(myCriteria);
if (locationProvider != null)
{
locationProvider.setLocationListener
(new myLocationListener(), -1, -1, -1);
}
}
catch (Exception err)
{
}
}
36
Development Guide Error handling
spd = location.getSpeed();
crs = location.getCourse();
}
Error handling
You can retrieve the last error that was received when a GPS fix is unsuccessful by invoking GPSInfo.getLastGPSError
(), available in the JSR 179 Location API, or BlackBerryLocation.getError(), available in the BlackBerry® extensions
to JSR 179.
37
Development Guide Handle errors (BlackBerry extensions to JSR 179)
38
Development Guide Handle errors (BlackBerry extensions to JSR 179)
{
return;
}
5. In the class, create a static class that implements LocationListener. Implement locationUpdated() and
providerStateChanged().
private static class myLocationListener implements LocationListener
{
public void locationUpdated(LocationProvider provider, Location location)
{
}
switch(bLoc.getStatus())
{
case BlackBerryLocation.GPS_ERROR:
int gpsStatus = bLoc.getError();
break;
case BlackBerryLocation.FAILOVER_MODE_ON:
case BlackBerryLocation.SUBSEQUENT_MODE_ON:
case BlackBerryLocation.GPS_FIX_PARTIAL:
case BlackBerryLocation.GPS_FIX_COMPLETE:
break;
}
}
39
Development Guide Handle errors (BlackBerry extensions to JSR 179)
new BlackBerryCriteria(GPSInfo.GPS_MODE_ASSIST);
try
{
BlackBerryLocationProvider myProvider =
(BlackBerryLocationProvider)
LocationProvider.getInstance(myCriteria);
myProvider.setLocationListener
(new myLocationListener(), -1, -1, -1);
}
catch ( LocationException lex )
{
return;
}
}
catch ( UnsupportedOperationException ex )
{
return;
}
}
switch(bLoc.getStatus())
{
case BlackBerryLocation.GPS_ERROR:
int gpsStatus = bLoc.getError();
break;
case BlackBerryLocation.FAILOVER_MODE_ON:
case BlackBerryLocation.SUBSEQUENT_MODE_ON:
case BlackBerryLocation.GPS_FIX_PARTIAL:
case BlackBerryLocation.GPS_FIX_COMPLETE:
break;
}
}
}
40
Development Guide Geocoding and reverse geocoding
41
Development Guide Retrieve geospatial coordindates for an address by using geocoding
{
}
}
3. In the class, create a private variable of type Thread.
private Thread geocoder;
4. In the constructor, create an instance of the Thread class. You cannot retrieve geocoding information on the application's
primary thread.
geocoder = new Thread(thread);
geocoder.setPriority(Thread.MIN_PRIORITY);
geocoder.start();
5. In the class, create a Thread that invokes a public run() method. In run(), create an instance of the AddressInfo
class. Populate the object with address information. Create an instance of the Coordinates class by passing the latitude,
longitude, and altitude values to the constructor to start the geocode search. In the following code sample, the positive
northern latitude and negative western longitude of the Waterloo, Ontario region are used by the LBS Locate Server to
perform the geocode search. Create a try/catch block. In this block, invoke geocode() to find the address and return
the results in a Landmark array.
Runnable thread = new Runnable()
{
public void run()
{
AddressInfo addrInfo = new AddressInfo();
try
{
Landmark[] results = Locator.geocode(addrInfo, coord);
}
catch ( LocatorException lex )
{
}
}
};
42
Development Guide Retrieve an address by using reverse geocoding
public myGeocode()
{
geocoder = new Thread(thread);
geocoder.setPriority(Thread.MIN_PRIORITY);
geocoder.start();
}
try
{
Landmark[] results = Locator.geocode(addrInfo, coord);
}
catch ( LocatorException lex )
{
}
}
};
}
43
Development Guide Retrieve an address by using reverse geocoding
try
{
Landmark[] results = Locator.reverseGeocode
(latitude, longitude, Locator.ADDRESS );
44
Development Guide Retrieve an address by using reverse geocoding
public myReverseGeocode()
{
reverseGeocode = new Thread(thread);
reverseGeocode.setPriority(Thread.MIN_PRIORITY);
reverseGeocode.start();
}
try
{
Landmark[] results = Locator.reverseGeocode
(latitude, longitude, Locator.ADDRESS );
45
Development Guide BlackBerry Maps
BlackBerry Maps 6
You can create a BlackBerry® device application that interacts with BlackBerry® Maps. BlackBerry Maps is a map and location
application that can display a map, the location of the BlackBerry device, a route from a starting location to a specific ending
location, and points of interest on a map.
Your application can interact with BlackBerry Maps in the following ways:
• Open BlackBerry Maps from your BlackBerry device application.
• Display KML overlays on BlackBerry Maps.
• Open BlackBerry Maps from the BlackBerry Browser.
• Embed a map in your BlackBerry device application.
BlackBerry Maps can be installed on BlackBerry devices that are running BlackBerry® Device Software 4.2 or later.
You can use the MapsArguments class in the net.rim.blackberry.api.invoke package to create a BlackBerry device
application that interacts with BlackBerry Maps.
46
Development Guide Open BlackBerry Maps by using information from a contact
47
Development Guide Open BlackBerry Maps by using information from a contact
}
catch (PIMException e)
{
return;
}
try
{
contacts = (ContactList) PIM.getInstance().openPIMList
(PIM.CONTACT_LIST, PIM.READ_ONLY);
}
catch (PIMException e)
{
return;
}
48
Development Guide Open BlackBerry Maps by using specific coordinates
contact.addString(Contact.FORMATTED_NAME, PIMItem.ATTR_NONE,
"Ms. Andrea Aime");
contact.addString(Contact.FORMATTED_ADDR, PIMItem.ATTR_NONE,
"455 Phillip St. Waterloo ON N2L3X2 Canada");
49
Development Guide Open BlackBerry Maps by using a landmark
4. In the constructor, create an instance of the MapsArguments class using the MapView object as an argument. Invoke
Invoke.invokeApplication() to open BlackBerry Maps and pass in the MapsArguments object.
MapsArguments mapsArgs = new MapsArguments(mapView);
Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, mapsArgs);
50
Development Guide Open BlackBerry Maps by using a landmark
4. In the constructor, create an AddressInfo array and invoke AddressInfo.setField() to specify the street address.
Add the AddressInfo array to the Landmark array.
AddressInfo addressInfo = new AddressInfo();
addressInfo.setField(AddressInfo.STREET, "455 Phillip St");
addressInfo.setField(AddressInfo.CITY, "Waterloo");
addressInfo.setField(AddressInfo.STATE, "Ontario");
landMarks[0] = new Landmark("AAA", "Description 1", null, addressInfo);
5. In the constructor, create an instance of the QualifiedCoordinates class and specify the coordinates. Add the
QualifiedCoordinates to the Landmark array.
QualifiedCoordinates coordinates =
new QualifiedCoordinates(45.4, -75.1, 0, 0, 0);
landMarks[1] = new Landmark("BBB", "Description 2", coordinates, null);
coordinates = new QualifiedCoordinates(45.3,-75.3,0,0,0);
landMarks[2] = new Landmark("CCC", "Description 3", coordinates, null);
6. In the constructor, create an instance of the MapsArguments class using the Landmarks array as an argument. Invoke
Invoke.invokeApplication() to open BlackBerry Maps. Pass in the MapsArguments object.
MapsArguments ma = new MapsArguments(landMarks);
Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, ma);
QualifiedCoordinates coordinates =
new QualifiedCoordinates(45.4, -75.1, 0, 0, 0);
51
Development Guide Opening BlackBerry Maps by using a location document
Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, ma);
}
}
52
Development Guide Opening BlackBerry Maps by using a location document
Code sample
<lbs clear='WatLocation'></lbs>
<lbs clear='WatLocation,OttLocation'></lbs>
<lbs clear='WatRoute'></lbs>
<lbs clear='WatRoute,OttRoute'></lbs>
<lbs clear='NONE'></lbs>
<lbs clear='DOCS'></lbs>
<lbs clear='LOCATIONS'></lbs>
<lbs clear='ROUTES'></lbs>
<lbs clear='ALL'></lbs>
53
Development Guide Opening BlackBerry Maps by using a location document
Code sample
54
Development Guide Opening BlackBerry Maps by using a location document
<lbs id='Waterloo'>
<location x='-8052237' y='4346518'
label='Waterloo, ON' description='Waterloo' zoom='10' />
</lbs>
Code sample
<lbs>
<getRoute>
<location x='-8052237' y='4346518'
label='Waterloo, ON' description='Waterloo, Ontario, Canada' />
<location lon='-7569792' lat='4542349'
label='Ottawa, ON' description='Ottawa, Ontario, Canada' />
</getRoute>
</lbs>
55
Development Guide Opening BlackBerry Maps by using a location document
{
}
}
3. In the constructor, create a String variable to use for the location document. Add an <lbs> element. Configure a
<location> element with the location that you want to display.
String document = "<lbs id='Waterloo'>
<location x='-8052237' y='4346518'
label='Waterloo, ON' description='Waterloo' zoom='10' />
</lbs>";
4. In the constructor, invoke Invoke.invokeApplication() using the APP_TYPE_MAPS constant and a new
MapsArguments object as parameters to open BlackBerry Maps. Pass in the ARG_LOCATION_DOCUMENT property and
the String variable that represents the location document as parameters for the MapsArguments class to display the
location provided in the location document.
Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, new MapsArguments
(MapsArguments.ARG_LOCATION_DOCUMENT, document));
5. Perform one of the following tasks to clear location information from a map after it has been displayed :
Task Steps
Clear a location from a map. Create a String that configures the clear attribute to be
the id of the location document that contains the location
information.
Clear all locations from a map. Create a String that configures the clear attribute to be
LOCATIONS.
Clear all locations and routes from a map. Create a String that configures the clear attribute to be
ALL.
Clearing map content occurs before any new map content is displayed on the map. You can combine the actions of displaying
and clearing map content into one location document.
56
Development Guide Opening BlackBerry Maps by using a location document
57
Development Guide Opening BlackBerry Maps by using a location document
4. In the constructor, invoke Invoke.invokeApplication() using the APP_TYPE_MAPS constant and a new
MapsArguments object as parameters to open BlackBerry Maps. Pass in the ARG_LOCATION_DOCUMENT property and
the String variable that represents the location document as parameters for the MapsArguments class to display the
route provided in the location document.
invoke.invokeApplication(Invoke.APP_TYPE_MAPS, new MapsArguments
(MapsArguments.ARG_LOCATION_DOCUMENT, document));
5. Perform one of the following tasks to clear route location information from a map after it has been displayed:
Task Steps
Clear a route from a map. Create a String that configures the clear attribute to be
the id of the location document that contains the route
information.
Clear all routes from a map. Create a String that configures the clear attribute to be
ROUTES.
Clear all routes and location information from a specific Create a String that configures the clear attribute to be
location documents with an id attribute. DOCS.
Clear all routes and location information from a map. Create a String that configures the clear attribute to be
ALL.
Clearing map content occurs before any new map content is displayed on the map. You can combine the actions of displaying
and clearing map content into one location document.
String document = "<lbs clear='WatRoute' id='NewRoute'><getRoute>
<location x='-8051111' y='4341111'
label='NewRoute #1' description='New Route #1' />
<location x='-7562222' y='4542222'
label='NewRoute #2' description='New Route #2' />
</getRoute></lbs>";
58
Development Guide Open BlackBerry Maps by using a local search
import net.rim.blackberry.api.invoke.*;
59
Development Guide Using KML documents with BlackBerry Maps
60
Development Guide Using KML documents with BlackBerry Maps
61
Development Guide Using KML documents with BlackBerry Maps
<visibility>0</visibility>
<open>1</open>
<GroundOverlay>
<name>Glowing</name>
<visibility>1</visibility>
<description>Hot Spot</description>
<Icon>
<href>http://www.example.com/picture.png</href>
<viewBoundScale>0.75</viewBoundScale>
</Icon>
<LatLonBox>
<north>43.47685828285541</north>
<south>43.47485739086753</south>
<east>-80.53898253546113</east>
<west>-80.54198566880086</west>
</LatLonBox>
</GroundOverlay>
</Folder>
</kml>
62
Development Guide Opening BlackBerry Maps from the BlackBerry Browser
import net.rim.blackberry.api.invoke.*;
63
Development Guide Retrieving a GPS location by using a web page
64
Development Guide Retrieve a GPS location by using a web page
The following code sample demonstrates how to determine if a web page was loaded by the BlackBerry® Browser and if the
BlackBerry device supports GPS functionality. If these conditions are true, the web page receives the updated location information
to start location tracking.
Code sample: Retrieving a GPS location by using a web page
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>GPS Testing</title>
</head>
<body>
<script type="text/javascript">
var modeCellsite = 0;
var modeAssisted = 1;
var modeAutonomous = 2;
function locationChanged()
{
alert("Lat " + blackberry.location.latitude +
" Lon " + blackberry.location.longitude +
" Time " + blackberry.location.timestamp );
return true;
65
Development Guide Embedding a map in an application
blackberry.location.onLocationUpdate("locationChanged()");
blackberry.location.setAidMode(modeAutonomous);
Method Description
move(int, int) Moves the position of the map by a certain number of pixels.
moveTo(Coordinates) Moves the position of the the map to the location specified by a
Coordinate object.
moveTo(int, int) Moves the postion of the map to the specified coordinates for latitude and
longitude.
setRotation(int) Rotates the current map view.
setZoom(int) Changes the zoom level of the current map view.
In the moveTo method, you can use world coordinates for the latitudinal and longitudinal coordinates. Valid ranges for latitude
are -9000000 to +9000000, and ranges for longitude are -18000000 to +18000000. Some methods in the MapField class
throw an IllegalArgumentException if the passed or calculated coordinates are out of range.
66
Development Guide Embedding a map in an application
MapFieldDemo()
{
pushScreen(new myScreen());
}
}
3. Create the framework for the screen by extending the FullScreen class. Implement the FieldChangeLister
interface to listen for events from the ButtonField object which is described in step 5. In the constructor, invoke super
() to create a default menu. Invoke createUI() to create the UI, which is described in step 4.
class myScreen extends FullScreen implements FieldChangeListener
{
private MapField _mapField;
private ButtonField _zoomIn;
private ButtonField _zoomOut;
private ButtonField _moveTo;
private BasicEditField _moveByText;
private BasicEditField _testsOutput;
private ObjectChoiceField _moveUnits;
private int _prevLat = 4328915;
private int _prevLon = -8032480;
private int _prevZoom = 4;
myScreen()
{
super(DEFAULT_MENU | DEFAULT_CLOSE);
67
Development Guide Embedding a map in an application
createUI();
}
}
4. In the myScreen class, create a method that you can use to create the UI within a synchronized block. Create an instance
of the VerticalFieldManager class to lay out the fields on the screen in a single column. Create an instance of the
MapField class to create a map in BlackBerry® Maps. Invoke add() to add the MapField to the
VerticalFieldManager.
private void createUI()
{
VerticalFieldManager vfm;
synchronized (Application.getEventLock())
{
vfm = new VerticalFieldManager
(Manager.USE_ALL_WIDTH | Manager.USE_ALL_HEIGHT);
_mapField = new MapField();
_mapField.setPreferredSize(_mapField.getPreferredWidth(),
(int) (Display.getHeight() * 0.66));
vfm.add(_mapField);
}
}
5. In createUI, create UI components so that the user can interact with the map. For each UI component, invoke
Field.setChangeListener() to specify the listeners for the UI components. Invoke add() to add the UI components
to the screen.
FlowFieldManager ffm = new FlowFieldManager();
ffm.add(_zoomIn = new ButtonField("Zoom In"));
_zoomIn.setChangeListener(this);
vfm.add(ffm);
add(vfm);
6. Set the default coordinates and the default zoom settings for the embedded map by invoking MapField.moveTo() and
MapField.setZoom().
68
Development Guide Embedding a map in an application
_mapField.moveTo(_prevLat, _prevLon);
_mapField.setZoom(_prevZoom);
7. In the myScreen class, implement FieldChangeListener.fieldChanged() to handle the user's interactions with
the UI components on the screen.
public void fieldChanged(Field field, int context)
{
if (field == _zoomIn)
{
_mapField.setZoom(Math.max(_mapField.getZoom() - 1,
_mapField.getMinZoom()));
}
else if (field == _zoomOut)
{
_mapField.setZoom(Math.min(_mapField.getZoom() + 1,
_mapField.getMaxZoom()));
}
else if (field == _moveTo)
{
String amount = _moveByText.getText();
int ix = amount.indexOf(",");
int horizontalDelta = 0;
int verticalDelta = 0;
if (ix == -1)
{
ix = amount.indexOf(" ");
}
try
{
horizontalDelta = Integer.parseInt
(amount.substring(0, ix).trim());
verticalDelta = Integer.parseInt
(amount.substring(ix + 1, amount.length()).trim());
}
catch (NumberFormatException nfe)
{
Dialog.alert("Bad value!");
}
if (_moveUnits.getSelectedIndex() == 0)
{
_mapField.move(horizontalDelta, verticalDelta);
}
else
{
horizontalDelta += _mapField.getLongitude();
verticalDelta += _mapField.getLatitude();
_mapField.moveTo(verticalDelta, horizontalDelta);
69
Development Guide Embedding a map in an application
}
}
}
MapFieldDemo()
{
pushScreen(new myScreen());
}
}
myScreen()
{
super(DEFAULT_MENU | DEFAULT_CLOSE);
createUI();
}
synchronized (Application.getEventLock())
{
vfm = new VerticalFieldManager
70
Development Guide Embedding a map in an application
(Manager.USE_ALL_WIDTH | Manager.USE_ALL_HEIGHT);
_mapField = new MapField();
_mapField.setPreferredSize(_mapField.getPreferredWidth(),
(int)(Display.getHeight() * 0.66));
vfm.add(_mapField);
}
vfm.add(ffm);
add(vfm);
_mapField.moveTo(_prevLat, _prevLon);
_mapField.setZoom(_prevZoom);
}
if (ix == -1)
{
71
Development Guide Embedding a map in an application
ix = amount.indexOf(" ");
}
try
{
horizontalDelta = Integer.parseInt
(amount.substring(0, ix).trim());
verticalDelta = Integer.parseInt
(amount.substring(ix + 1, amount.length()).trim());
}
catch (NumberFormatException nfe)
{
Dialog.alert("Bad value!");
}
if (_moveUnits.getSelectedIndex() == 0)
{
_mapField.move(horizontalDelta, verticalDelta);
}
else
{
horizontalDelta += _mapField.getLongitude();
verticalDelta += _mapField.getLatitude();
_mapField.moveTo(verticalDelta, horizontalDelta);
}
}
}
}
72
Development Guide Glossary
Glossary 7
API
application programming interface
CDMA
Code Division Multiple Access
GPS
Global Positioning System
HTTP
Hypertext Transfer Protocol
JSR
Java® Specification Request
KML
Keyhole Markup Language
MIME
Multipurpose Internet Mail Extensions
NMEA
National Marine Electronics Association
PDE
Position Determination Entity
XML
Extensible Markup Language
73
Development Guide Provide feedback
Provide feedback 8
To provide feedback on this deliverable, visit www.blackberry.com/docsfeedback.
74
Development Guide Document revision history
Date Description
6 April 2010 Changed the following topics:
• BlackBerry Maps
• Opening BlackBerry Maps from your application
• Open BlackBerry Maps by using the default settings
• Open BlackBerry Maps by using information from a contact
• Open BlackBerry Maps by using specific coordinates
• Open BlackBerry Maps by using a landmark
• Opening BlackBerry Maps by using a location document
• XML element: <lbs>
• XML element: <location>
• XML element: <getRoute>
• Display and clear locations on a map by using a location document
• Display and clear a route on a map by using a location document
• Open BlackBerry Maps by using a local search
• Using KML documents with BlackBerry Maps
• Supported KML elements
• Create a basic KML document
• Displaying KML overlays on BlackBerry Maps
• Invoke BlackBerry Maps by using a KML document
• Opening BlackBerry Maps from the BlackBerry Browser
75
Development Guide Document revision history
Date Description
• Retrieving a GPS location by using a web page
• Retrieve a GPS location by using a web page
• Embedding a map in an application
• Embed a map in an application
76
Development Guide Legal notice
Legal notice 10
©2010 Research In Motion Limited. All rights reserved. BlackBerry®, RIM®, Research In Motion®, SureType®, SurePress™ and
related trademarks, names, and logos are the property of Research In Motion Limited and are registered and/or used in the U.S.
and countries around the world.
Bluetooth is a trademark of Bluetooth SIG. Java, Java ME, Java SE and JavaScript are trademarks of Sun Microsystems, Inc.
OpenGIS is a trademark of Open Geospatial Consortium, Inc. Wi-Fi is a trademark of the Wi-Fi Alliance. All other trademarks are
the property of their respective owners.
This documentation including all documentation incorporated by reference herein such as documentation provided or made
available at www.blackberry.com/go/docs is provided or made accessible "AS IS" and "AS AVAILABLE" and without condition,
endorsement, guarantee, representation, or warranty of any kind by Research In Motion Limited and its affiliated companies
("RIM") and RIM assumes no responsibility for any typographical, technical, or other inaccuracies, errors, or omissions in this
documentation. In order to protect RIM proprietary and confidential information and/or trade secrets, this documentation may
describe some aspects of RIM technology in generalized terms. RIM reserves the right to periodically change information that
is contained in this documentation; however, RIM makes no commitment to provide any such changes, updates, enhancements,
or other additions to this documentation to you in a timely manner or at all.
This documentation might contain references to third-party sources of information, hardware or software, products or services
including components and content such as content protected by copyright and/or third-party web sites (collectively the "Third
Party Products and Services"). RIM does not control, and is not responsible for, any Third Party Products and Services including,
without limitation the content, accuracy, copyright compliance, compatibility, performance, trustworthiness, legality, decency,
links, or any other aspect of Third Party Products and Services. The inclusion of a reference to Third Party Products and Services
in this documentation does not imply endorsement by RIM of the Third Party Products and Services or the third party in any way.
EXCEPT TO THE EXTENT SPECIFICALLY PROHIBITED BY APPLICABLE LAW IN YOUR JURISDICTION, ALL CONDITIONS,
ENDORSEMENTS, GUARANTEES, REPRESENTATIONS, OR WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
WITHOUT LIMITATION, ANY CONDITIONS, ENDORSEMENTS, GUARANTEES, REPRESENTATIONS OR WARRANTIES OF
DURABILITY, FITNESS FOR A PARTICULAR PURPOSE OR USE, MERCHANTABILITY, MERCHANTABLE QUALITY, NON-
INFRINGEMENT, SATISFACTORY QUALITY, OR TITLE, OR ARISING FROM A STATUTE OR CUSTOM OR A COURSE OF DEALING
OR USAGE OF TRADE, OR RELATED TO THE DOCUMENTATION OR ITS USE, OR PERFORMANCE OR NON-PERFORMANCE
OF ANY SOFTWARE, HARDWARE, SERVICE, OR ANY THIRD PARTY PRODUCTS AND SERVICES REFERENCED HEREIN, ARE
HEREBY EXCLUDED. YOU MAY ALSO HAVE OTHER RIGHTS THAT VARY BY STATE OR PROVINCE. SOME JURISDICTIONS
MAY NOT ALLOW THE EXCLUSION OR LIMITATION OF IMPLIED WARRANTIES AND CONDITIONS. TO THE EXTENT
PERMITTED BY LAW, ANY IMPLIED WARRANTIES OR CONDITIONS RELATING TO THE DOCUMENTATION TO THE EXTENT
THEY CANNOT BE EXCLUDED AS SET OUT ABOVE, BUT CAN BE LIMITED, ARE HEREBY LIMITED TO NINETY (90) DAYS FROM
THE DATE YOU FIRST ACQUIRED THE DOCUMENTATION OR THE ITEM THAT IS THE SUBJECT OF THE CLAIM.
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW IN YOUR JURISDICTION, IN NO EVENT SHALL RIM BE LIABLE
FOR ANY TYPE OF DAMAGES RELATED TO THIS DOCUMENTATION OR ITS USE, OR PERFORMANCE OR NON-
PERFORMANCE OF ANY SOFTWARE, HARDWARE, SERVICE, OR ANY THIRD PARTY PRODUCTS AND SERVICES REFERENCED
HEREIN INCLUDING WITHOUT LIMITATION ANY OF THE FOLLOWING DAMAGES: DIRECT, CONSEQUENTIAL, EXEMPLARY,
INCIDENTAL, INDIRECT, SPECIAL, PUNITIVE, OR AGGRAVATED DAMAGES, DAMAGES FOR LOSS OF PROFITS OR REVENUES,
77
Development Guide Legal notice
FAILURE TO REALIZE ANY EXPECTED SAVINGS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, LOSS OF
BUSINESS OPPORTUNITY, OR CORRUPTION OR LOSS OF DATA, FAILURES TO TRANSMIT OR RECEIVE ANY DATA, PROBLEMS
ASSOCIATED WITH ANY APPLICATIONS USED IN CONJUNCTION WITH RIM PRODUCTS OR SERVICES, DOWNTIME COSTS,
LOSS OF THE USE OF RIM PRODUCTS OR SERVICES OR ANY PORTION THEREOF OR OF ANY AIRTIME SERVICES, COST OF
SUBSTITUTE GOODS, COSTS OF COVER, FACILITIES OR SERVICES, COST OF CAPITAL, OR OTHER SIMILAR PECUNIARY
LOSSES, WHETHER OR NOT SUCH DAMAGES WERE FORESEEN OR UNFORESEEN, AND EVEN IF RIM HAS BEEN ADVISED
OF THE POSSIBILITY OF SUCH DAMAGES.
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW IN YOUR JURISDICTION, RIM SHALL HAVE NO OTHER
OBLIGATION, DUTY, OR LIABILITY WHATSOEVER IN CONTRACT, TORT, OR OTHERWISE TO YOU INCLUDING ANY LIABILITY
FOR NEGLIGENCE OR STRICT LIABILITY.
THE LIMITATIONS, EXCLUSIONS, AND DISCLAIMERS HEREIN SHALL APPLY: (A) IRRESPECTIVE OF THE NATURE OF THE
CAUSE OF ACTION, DEMAND, OR ACTION BY YOU INCLUDING BUT NOT LIMITED TO BREACH OF CONTRACT, NEGLIGENCE,
TORT, STRICT LIABILITY OR ANY OTHER LEGAL THEORY AND SHALL SURVIVE A FUNDAMENTAL BREACH OR BREACHES
OR THE FAILURE OF THE ESSENTIAL PURPOSE OF THIS AGREEMENT OR OF ANY REMEDY CONTAINED HEREIN; AND (B)
TO RIM AND ITS AFFILIATED COMPANIES, THEIR SUCCESSORS, ASSIGNS, AGENTS, SUPPLIERS (INCLUDING AIRTIME
SERVICE PROVIDERS), AUTHORIZED RIM DISTRIBUTORS (ALSO INCLUDING AIRTIME SERVICE PROVIDERS) AND THEIR
RESPECTIVE DIRECTORS, EMPLOYEES, AND INDEPENDENT CONTRACTORS.
IN ADDITION TO THE LIMITATIONS AND EXCLUSIONS SET OUT ABOVE, IN NO EVENT SHALL ANY DIRECTOR, EMPLOYEE,
AGENT, DISTRIBUTOR, SUPPLIER, INDEPENDENT CONTRACTOR OF RIM OR ANY AFFILIATES OF RIM HAVE ANY LIABILITY
ARISING FROM OR RELATED TO THE DOCUMENTATION.
Prior to subscribing for, installing, or using any Third Party Products and Services, it is your responsibility to ensure that your
airtime service provider has agreed to support all of their features. Some airtime service providers might not offer Internet browsing
functionality with a subscription to the BlackBerry® Internet Service. Check with your service provider for availability, roaming
arrangements, service plans and features. Installation or use of Third Party Products and Services with RIM's products and services
may require one or more patent, trademark, copyright, or other licenses in order to avoid infringement or violation of third party
rights. You are solely responsible for determining whether to use Third Party Products and Services and if any third party licenses
are required to do so. If required you are responsible for acquiring them. You should not install or use Third Party Products and
Services until all necessary licenses have been acquired. Any Third Party Products and Services that are provided with RIM's
products and services are provided as a convenience to you and are provided "AS IS" with no express or implied conditions,
endorsements, guarantees, representations, or warranties of any kind by RIM and RIM assumes no liability whatsoever, in relation
thereto. Your use of Third Party Products and Services shall be governed by and subject to you agreeing to the terms of separate
licenses and other agreements applicable thereto with third parties, except to the extent expressly covered by a license or other
agreement with RIM.
Certain features outlined in this documentation require a minimum version of BlackBerry® Enterprise Server, BlackBerry® Desktop
Software, and/or BlackBerry® Device Software.
The terms of use of any RIM product or service are set out in a separate license or other agreement with RIM applicable thereto.
NOTHING IN THIS DOCUMENTATION IS INTENDED TO SUPERSEDE ANY EXPRESS WRITTEN AGREEMENTS OR WARRANTIES
PROVIDED BY RIM FOR PORTIONS OF ANY RIM PRODUCT OR SERVICE OTHER THAN THIS DOCUMENTATION.
78
Development Guide Legal notice
Published in Canada
79