Blackberry JAVA DEVELOPMENT ENVIRONMENT - - GPS AND MAPS - DEVELOPMENT GUIDE Bedienungsanleitung Seite 6

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 16
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 5
Feature Description
You can use the LocationInfo.isModeAvailable() method that is provided in the
net.rim.device.api.gps.LocationInfo package to query if a specific mode is
available. You can specify a geolocation mode from the LocationInfo class, or a mode from
the GPSInfo class as a parameter for the LocationInfo.isModeAvailable() method.
You can use the geolocation modes in the BlackBerryCriteria class to request a location
provider for geolocation from the BlackBerryLocationProvider class.
If you specify the GPSInfo.GPS_MODE_CELLSITE mode, the location is retrieved from cell
site towers. If this mode is not supported or available by the wireless service provider, the location
is retrieved using GEOLOCATION_MODE .
For more information about the geolocation modes, visit www.blackberry.com/go/devguides to
read the BlackBerry Java Application Location-Based Services Development Guide.
turning on and
querying Location
Services on the device
You can use the LocationInfo.setLocationOn() method to turn on the Location Services
option on the BlackBerry device. If the Location Services option is turned on, your application can
retrieve location information using the available location sources (for example, GPS and
geolocation). You should prompt the user before turning on the Location Services option.
You can use the LocationInfo.isLocationOn() method to determine if the Location
Services option on the device is turned on. If Location Services is turned on but the user turns off
the geolocation feature in the Location Data option, geolocation services are unavailable.
querying location
sources
You can use the following methods in the LocationInfo class to determine which location
sources (internal GPS receiver, external GPS receiver, or geolocation) are supported or available
on the device.
getSupportedLocationSources() determines which location sources are
supported on the device
isLocationSourceSupported() determines if a specified location source is
supported on the device
getAvailableLocationSources() determines which location sources are available
on the device
isLocationSourceAvailable() determines if a specified location source is available
on the device
Note: A location source might be supported on the device but unavailable (for example, the user
turned the location source off).
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
4
Seitenansicht 5
1 2 3 4 5 6 7 8 9 10 11 ... 15 16

Kommentare zu diesen Handbüchern

Keine Kommentare