net.rim.device.api.gps
Class GPSInfo

java.lang.Object
  extended by net.rim.device.api.gps.GPSInfo

public class GPSInfo
extends Object

Provides access to device specific Global Positioning System receiver (if equipped) information.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.7.0

Field Summary
Category: Signed static int GPS_DEVICE_BLUETOOTH
          Denotes BlueTooth GPS
Category: Signed static int GPS_DEVICE_INTERNAL
          Denotes internal GPS
Category: Signed static int GPS_ERROR_ALMANAC_OUTDATED
          Almanac outdated.
Category: Signed static int GPS_ERROR_AUTHENTICATION_FAILURE
          Authentication failed with the network
Category: Signed static int GPS_ERROR_CHIPSET_DEAD
          GPS chipset dead; no fix.
Category: Signed static int GPS_ERROR_DEGRADED_FIX_IN_ALLOTTED_TIME
          Degraded fix; poor accuracy.
Category: Signed static int GPS_ERROR_GPS_LOCKED
          GPS service locked
Category: Signed static int GPS_ERROR_INVALID_NETWORK_CREDENTIAL
          Invalid network credential
Category: Signed static int GPS_ERROR_INVALID_REQUEST
          Request is invalid.
Category: Signed static int GPS_ERROR_LOW_BATTERY
          Low battery; fix cannot be obtained.
Category: Signed static int GPS_ERROR_NETWORK_CONNECTION_FAILURE
          Unable to connect to the data network
Category: Signed static int GPS_ERROR_NONE
          No GPS Error
Category: Signed static int GPS_ERROR_NO_FIX_IN_ALLOTTED_TIME
          No fix obtained in alloted time.
Category: Signed static int GPS_ERROR_NO_SATELLITE_IN_VIEW
          No Satellite is in view or the signal strength is too low to get a position fix
Category: Signed static int GPS_ERROR_PRIVACY_ACCESS_DENIED
          Privacy setting denies getting a fix.
Category: Signed static int GPS_ERROR_SERVICE_UNAVAILABLE
          GPS service is not available due to no cellular service or no data service or no resources, etc
Category: Signed static int GPS_ERROR_TIMEOUT_DEGRADED_FIX_NO_ASSIST_DATA
          Degraded fix (no assist data); poor accuracy.
Category: Signed static int GPS_ERROR_TIMEOUT_NO_FIX_NO_ASSIST_DATA
          No fix in alloted time, no assist.
Category: Signed static int GPS_MODE_ASSIST
          Assisted GPS mode
Category: Signed static int GPS_MODE_AUTONOMOUS
          Autonomous GPS Mode
Category: Signed static int GPS_MODE_BT
          Using Bluetooth GPS
Category: Signed static int GPS_MODE_CDMA_ACCURACY_OPTIMAL
          ACCURACY OPTIMAL GPS Mode - for CDMA BlackBerry Smartphones only.
Category: Signed static int GPS_MODE_CDMA_DATA_OPTIMAL
          DATA OPTIMAL GPS Mode - for CDMA BlackBerry Smartphones only.
Category: Signed static int GPS_MODE_CDMA_MS_ASSIST
          MS-ASSIST GPS Mode - for CDMA BlackBerry Smartphones only.
Category: Signed static int GPS_MODE_CDMA_MS_BASED
          MS-BASED GPS Mode - for CDMA BlackBerry Smartphones only.
Category: Signed static int GPS_MODE_CDMA_SPEED_OPTIMAL
          SPEED OPTIMAL GPS Mode - for CDMA BlackBerry Smartphones only.
Category: Signed static int GPS_MODE_CELLSITE
          Cellsite GPS mode
Category: Signed static int GPS_MODE_NONE
          No GPS Mode
 
Method Summary
Category: Signed static int getDefaultGPSMode()
          Provides the default GPS mode on the device.
Category: Signed static Enumeration getGPSDataSource()
          Provides the list of GPS data sources.
Category: Signed static int getLastGPSError()
          Returns the last error received when a position fix could not be obtained.
Category: Signed static boolean isGPSModeAvailable(int mode)
          This method allows an application to query whether a given GPS mode is available to be used by the application.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Field Detail

GPS_ERROR_NONE

public static final int GPS_ERROR_NONE

No GPS Error

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.7.0

GPS_ERROR_NO_FIX_IN_ALLOTTED_TIME

public static final int GPS_ERROR_NO_FIX_IN_ALLOTTED_TIME

No fix obtained in alloted time.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.7.0

GPS_ERROR_DEGRADED_FIX_IN_ALLOTTED_TIME

public static final int GPS_ERROR_DEGRADED_FIX_IN_ALLOTTED_TIME

Degraded fix; poor accuracy.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.7.0

GPS_ERROR_TIMEOUT_NO_FIX_NO_ASSIST_DATA

public static final int GPS_ERROR_TIMEOUT_NO_FIX_NO_ASSIST_DATA

No fix in alloted time, no assist.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.7.0

GPS_ERROR_TIMEOUT_DEGRADED_FIX_NO_ASSIST_DATA

public static final int GPS_ERROR_TIMEOUT_DEGRADED_FIX_NO_ASSIST_DATA

Degraded fix (no assist data); poor accuracy.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.7.0

GPS_ERROR_LOW_BATTERY

public static final int GPS_ERROR_LOW_BATTERY

Low battery; fix cannot be obtained.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.7.0

GPS_ERROR_CHIPSET_DEAD

public static final int GPS_ERROR_CHIPSET_DEAD

GPS chipset dead; no fix.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.7.0

GPS_ERROR_INVALID_REQUEST

public static final int GPS_ERROR_INVALID_REQUEST

Request is invalid.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.7.0

GPS_ERROR_PRIVACY_ACCESS_DENIED

public static final int GPS_ERROR_PRIVACY_ACCESS_DENIED

Privacy setting denies getting a fix.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.7.0

GPS_ERROR_ALMANAC_OUTDATED

public static final int GPS_ERROR_ALMANAC_OUTDATED

Almanac outdated.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.7.0

GPS_ERROR_SERVICE_UNAVAILABLE

public static final int GPS_ERROR_SERVICE_UNAVAILABLE

GPS service is not available due to no cellular service or no data service or no resources, etc

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.7.0

GPS_ERROR_GPS_LOCKED

public static final int GPS_ERROR_GPS_LOCKED

GPS service locked

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.7.0

GPS_ERROR_NO_SATELLITE_IN_VIEW

public static final int GPS_ERROR_NO_SATELLITE_IN_VIEW

No Satellite is in view or the signal strength is too low to get a position fix

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.7.0

GPS_ERROR_AUTHENTICATION_FAILURE

public static final int GPS_ERROR_AUTHENTICATION_FAILURE

Authentication failed with the network

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.7.0

GPS_ERROR_NETWORK_CONNECTION_FAILURE

public static final int GPS_ERROR_NETWORK_CONNECTION_FAILURE

Unable to connect to the data network

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.7.0

GPS_ERROR_INVALID_NETWORK_CREDENTIAL

public static final int GPS_ERROR_INVALID_NETWORK_CREDENTIAL

Invalid network credential

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.7.0

GPS_MODE_NONE

public static final int GPS_MODE_NONE

No GPS Mode

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

GPS_MODE_CELLSITE

public static final int GPS_MODE_CELLSITE

Cellsite GPS mode

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

GPS_MODE_ASSIST

public static final int GPS_MODE_ASSIST

Assisted GPS mode

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

GPS_MODE_AUTONOMOUS

public static final int GPS_MODE_AUTONOMOUS

Autonomous GPS Mode

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

GPS_MODE_CDMA_MS_BASED

public static final int GPS_MODE_CDMA_MS_BASED

MS-BASED GPS Mode - for CDMA BlackBerry Smartphones only.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

GPS_MODE_CDMA_MS_ASSIST

public static final int GPS_MODE_CDMA_MS_ASSIST

MS-ASSIST GPS Mode - for CDMA BlackBerry Smartphones only.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

GPS_MODE_CDMA_DATA_OPTIMAL

public static final int GPS_MODE_CDMA_DATA_OPTIMAL

DATA OPTIMAL GPS Mode - for CDMA BlackBerry Smartphones only.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

GPS_MODE_CDMA_SPEED_OPTIMAL

public static final int GPS_MODE_CDMA_SPEED_OPTIMAL

SPEED OPTIMAL GPS Mode - for CDMA BlackBerry Smartphones only.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

GPS_MODE_CDMA_ACCURACY_OPTIMAL

public static final int GPS_MODE_CDMA_ACCURACY_OPTIMAL

ACCURACY OPTIMAL GPS Mode - for CDMA BlackBerry Smartphones only.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

GPS_MODE_BT

public static final int GPS_MODE_BT

Using Bluetooth GPS

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

GPS_DEVICE_INTERNAL

public static final int GPS_DEVICE_INTERNAL

Denotes internal GPS

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

GPS_DEVICE_BLUETOOTH

public static final int GPS_DEVICE_BLUETOOTH

Denotes BlueTooth GPS

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0


Method Detail

isGPSModeAvailable

public static boolean isGPSModeAvailable(int mode)
This method allows an application to query whether a given GPS mode is available to be used by the application.

Parameters:
mode - - the GPS mode can be one of

GPS_MODE_CELLSITE

GPS_MODE_ASSIST

GPS_MODE_AUTONOMOUS

GPS_MODE_CDMA_MS_BASED

GPS_MODE_CDMA_MS_ASSIST

GPS_MODE_CDMA_SPEED_OPTIMAL

GPS_MODE_CDMA_ACCURACY_OPTIMAL

GPS_MODE_CDMA_DATA_OPTIMAL

GPS_MODE_BT

Returns:
true if the GPS mode is available, false otherwise
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

getDefaultGPSMode

public static int getDefaultGPSMode()
Provides the default GPS mode on the device. When the application does not specify a GPS Criteria to use.

Returns:
the default GPS mode used which is one of:

GPS_MODE_AUTONOMOUS

GPS_MODE_ASSIST

GPS_MODE_CELLSITE

GPS_MODE_BT

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

getGPSDataSource

public static Enumeration getGPSDataSource()
Provides the list of GPS data sources.

Returns:
an enumeration of GPS data sources (string). This includes internal GPS and bluetooth devices, if any. Returns null if there is no GPS data source.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

getLastGPSError

public static int getLastGPSError()
Returns the last error received when a position fix could not be obtained.

Returns:

GPS_ERROR_NONE - there was no GPS error.

GPS_ERROR_NO_FIX_IN_ALLOTTED_TIME - no GPS fix can be obtained in the alloted time.

GPS_ERROR_DEGRADED_FIX_IN_ALLOTTED_TIME - denotes a degraded GPS fix with poor accuracy.

GPS_ERROR_TIMEOUT_NO_FIX_NO_ASSIST_DATA - no GPS fix can be obtained in the alloted time and assisted mode could not be used.

GPS_ERROR_TIMEOUT_DEGRADED_FIX_NO_ASSIST_DATA - denotes a degraded GPS fix with poor accuracy while assisted mode could not be used.

GPS_ERROR_LOW_BATTERY- a GPS fix could not be obtained since the battery is low.

GPS_ERROR_CHIPSET_DEAD - a GPS fix could not be obtained since the GPS chipset is dead.

GPS_ERROR_INVALID_REQUEST - the GPS fix request was invalid.

GPS_ERROR_PRIVACY_ACCESS_DENIED - the privacy setting denies getting a fix.

GPS_ERROR_ALMANAC_OUTDATED - a GPS fix could not be obtained since the Almanac is outdated.

GPS_ERROR_SERVICE_UNAVAILABLE - the GPS service is not available due to no cellular service or no data service or no resources, etc.

GPS_ERROR_GPS_LOCKED - the GPS service locked.

GPS_ERROR_NO_SATELLITE - there are no Satellite is in view or the signal strength is too low to get a position fix.

GPS_ERROR_AUTHENTICATION_FAILURE - the MPC authentication failed.

GPS_ERROR_NETWORK_CONNECTION_FAILURE - the device was unable to connect to the PDE.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.7.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.