Blackberry JAVA DEVELOPMENT ENVIRONMENT - - GPS AND MAPS - DEVELOPMENT GUIDE Manual do Utilizador Página 14

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 30
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 13
14
GPS and BlackBerry Maps Development Guide
Specifying a GPS receiver as the source for location
information
On a BlackBerry® device with BlackBerry® Device Software version 4.2 or later, you can configure a GPS receiver
that uses Bluetooth® technology as the data source for location information that the Location API uses when a
BlackBerry device application accesses the Location API. You can also configure the frequency that a BlackBerry
device uses to request location information from a Bluetooth enabled GPS receiver.
If only one Bluetooth enabled GPS receiver is paired with a BlackBerry device, the Location API will try to use the
Bluetooth enabled GPS receiver as the source for location information.
If more than one Bluetooth enabled GPS receiver is paired with a BlackBerry device, the BlackBerry device user
can select the Bluetooth enabled GPS receiver as the source for location information for the Location API.
On a BlackBerry device with BlackBerry Device Software version 4.2 or later that does not have an internal
GPS receiver, a BlackBerry device user can specify one or more Bluetooth enabled GPS receivers as the data
source for location information that the Location API uses. When a BlackBerry device application attempts to
access the Location API, and GPS is unavailable on the BlackBerry device, the BlackBerry device will
automatically connect to and use the Bluetooth enabled GPS receiver as the data source for location
information that the Location API uses.
On a BlackBerry device with BlackBerry Device Software version 4.2 or later with an internal GPS receiver, a
BlackBerry device user can choose between internal GPS or a Bluetooth enabled GPS receiver as the data
source for location information that the Location API uses.
BlackBerry smartphones with an internal GPS receiver
BlackBerry® 7100i smartphone
BlackBerry® 7130e smartphone
Change the criteria for a
LocationProvider that is associated
with an
LocationListener.
1. Create a new Criteria object.
Criteria criteria2 = new Criteria();
2. Set the new criteria by invoking the setHorizontalAccuracy(),
setVerticalAccuracy(), setCostAllowed(), and
setPreferredPowerConsumption()
methods of the new Criteria object.
3. Invoke LocationProvider.reset().
LocationProvider.reset();
4. Set the LocationListener to null.
provider.setLocationListener(null, -1, -1, -1);
5. Create a new instance of a LocationProvider by invoking
LocationProvider.getInstance()using the new Criteria object as a parameter.
provider = LocationProvider.getInstance(criteria2);
6. Set the LocationListener.
provider.setLocationListener(LocationListener listener, int
interval, int timeout, int maxAge);
Task Steps
Vista de página 13
1 2 ... 9 10 11 12 13 14 15 16 17 18 19 ... 29 30

Comentários a estes Manuais

Sem comentários