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

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 30
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 9
10
GPS and BlackBerry Maps Development Guide
> To specify the mode for getting GPS location information, create an instance of the
javax.microedition.location.Criteria class, invoke the appropriate set methods, and then pass the instance to
LocationProvider.getInstance().
Get location information from cell site towers
1. Create an instance of a Criteria object.
Criteria criteria = new Criteria();
2. Perform the following tasks:
3. Invoke LocationProvider.getInstance(), storing the returned object in a LocationProvider object.
LocationProvider provider = LocationProvider.getInstance(criteria);
Get location information from GPS satellites using PDE
1. Create an instance of a Criteria object.
Criteria criteria = new Criteria();
2. Perform the following tasks:
3. Invoke LocationProvider.getInstance(), storing the returned object in a LocationProvider object.
LocationProvider provider = LocationProvider.getInstance(criteria);
Task Steps
Specify longitudinal accuracy is not
required.
>Invoke criteria.setHorizontalAccuracy(NO_REQUIREMENT).
criteria.setHorizontalAccuracy(NO_REQUIREMENT);
Specify latitudinal accuracy is not
required.
>Invoke criteria.setVerticalAccuracy(NO_REQUIREMENT).
criteria.setVerticalAccuracy(NO_REQUIREMENT);
Specify that this mode can incur
cost.
>Invoke criteria.setCostAllowed(true).
criteria.setCostAllowed(true);
Specify power consumption is low. > Invoke criteria.setPreferredPowerConsumption(POWER_USAGE_LOW).
setPreferredPowerConsumption(POWER_USAGE_LOW);
Task Steps
Specify longitudinal accuracy is not
required.
>Invoke criteria.setHorizontalAccuracy(NO_REQUIREMENT).
criteria.setHorizontalAccuracy(NO_REQUIREMENT);
Specify latitudinal accuracy is not
required.
>Invoke criteria.setVerticalAccuracy(NO_REQUIREMENT).
criteria.setVerticalAccuracy(NO_REQUIREMENT);
Specify that this mode can incur
cost.
>Invoke criteria.setCostAllowed(true).
criteria.setCostAllowed(true);
Specify power consumption is
medium or not required.
>Invoke criteria.setPreferredPowerConsumption(int level)using one of
POWER_USAGE_MEDIUM, or NO_REQUIREMENT as the parameter.
criteria.setPreferredPowerConsumption(POWER_USAGE_MEDIUM);
Seitenansicht 9
1 2 ... 5 6 7 8 9 10 11 12 13 14 15 ... 29 30

Kommentare zu diesen Handbüchern

Keine Kommentare