GnssStatus
  public
  
  final
  
  class
  GnssStatus
  
    extends Object
  
  
  
  
  
      implements
      
        Parcelable
      
  
  
| java.lang.Object | |
| ↳ | android.location.GnssStatus | 
This class represents the current state of the GNSS engine and is used in conjunction with
 GnssStatus.Callback.
Summary
| Nested classes | |
|---|---|
| 
        
        
        
        
        class | GnssStatus.BuilderBuilder class to help create new GnssStatus instances. | 
| 
        
        
        
        
        class | GnssStatus.CallbackUsed for receiving notifications when GNSS events happen. | 
| Constants | |
|---|---|
| int | CONSTELLATION_BEIDOUConstellation type constant for Beidou. | 
| int | CONSTELLATION_GALILEOConstellation type constant for Galileo. | 
| int | CONSTELLATION_GLONASSConstellation type constant for Glonass. | 
| int | CONSTELLATION_GPSConstellation type constant for GPS. | 
| int | CONSTELLATION_IRNSSConstellation type constant for IRNSS. | 
| int | CONSTELLATION_QZSSConstellation type constant for QZSS. | 
| int | CONSTELLATION_SBASConstellation type constant for SBAS. | 
| int | CONSTELLATION_UNKNOWNUnknown constellation type. | 
| Inherited constants | 
|---|
| Fields | |
|---|---|
| 
    public
    static
    final
    Creator<GnssStatus> | CREATOR
 | 
| Public methods | |
|---|---|
| 
        
        
        
        
        
        int | 
      describeContents()
      Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. | 
| 
        
        
        
        
        
        boolean | 
      equals(Object o)
      Indicates whether some other object is "equal to" this one. | 
| 
        
        
        
        
        
        float | 
      getAzimuthDegrees(int satelliteIndex)
      Retrieves the azimuth the satellite at the specified index. | 
| 
        
        
        
        
        
        float | 
      getBasebandCn0DbHz(int satelliteIndex)
      Retrieves the baseband carrier-to-noise density of the satellite at the specified index in dB-Hz. | 
| 
        
        
        
        
        
        float | 
      getCarrierFrequencyHz(int satelliteIndex)
      Gets the carrier frequency of the signal tracked. | 
| 
        
        
        
        
        
        float | 
      getCn0DbHz(int satelliteIndex)
      Retrieves the carrier-to-noise density at the antenna of the satellite at the specified index in dB-Hz. | 
| 
        
        
        
        
        
        int | 
      getConstellationType(int satelliteIndex)
      Retrieves the constellation type of the satellite at the specified index. | 
| 
        
        
        
        
        
        float | 
      getElevationDegrees(int satelliteIndex)
      Retrieves the elevation of the satellite at the specified index. | 
| 
        
        
        
        
        
        int | 
      getSatelliteCount()
      Gets the total number of satellites in satellite list. | 
| 
        
        
        
        
        
        int | 
      getSvid(int satelliteIndex)
      Gets the identification number for the satellite at the specific index. | 
| 
        
        
        
        
        
        boolean | 
      hasAlmanacData(int satelliteIndex)
      Reports whether the satellite at the specified index has almanac data. | 
| 
        
        
        
        
        
        boolean | 
      hasBasebandCn0DbHz(int satelliteIndex)
      Reports whether a valid  | 
| 
        
        
        
        
        
        boolean | 
      hasCarrierFrequencyHz(int satelliteIndex)
      Reports whether a valid  | 
| 
        
        
        
        
        
        boolean | 
      hasEphemerisData(int satelliteIndex)
      Reports whether the satellite at the specified index has ephemeris data. | 
| 
        
        
        
        
        
        int | 
      hashCode()
      Returns a hash code value for the object. | 
| 
        
        
        
        
        
        boolean | 
      usedInFix(int satelliteIndex)
      Reports whether the satellite at the specified index was used in the calculation of the most recent position fix. | 
| 
        
        
        
        
        
        void | 
      writeToParcel(Parcel parcel, int flags)
      Flatten this object in to a Parcel. | 
| Inherited methods | |
|---|---|
Constants
CONSTELLATION_BEIDOU
public static final int CONSTELLATION_BEIDOU
Constellation type constant for Beidou.
Constant Value: 5 (0x00000005)
CONSTELLATION_GALILEO
public static final int CONSTELLATION_GALILEO
Constellation type constant for Galileo.
Constant Value: 6 (0x00000006)
CONSTELLATION_GLONASS
public static final int CONSTELLATION_GLONASS
Constellation type constant for Glonass.
Constant Value: 3 (0x00000003)
CONSTELLATION_GPS
public static final int CONSTELLATION_GPS
Constellation type constant for GPS.
Constant Value: 1 (0x00000001)
CONSTELLATION_IRNSS
public static final int CONSTELLATION_IRNSS
Constellation type constant for IRNSS.
Constant Value: 7 (0x00000007)
CONSTELLATION_QZSS
public static final int CONSTELLATION_QZSS
Constellation type constant for QZSS.
Constant Value: 4 (0x00000004)
CONSTELLATION_SBAS
public static final int CONSTELLATION_SBAS
Constellation type constant for SBAS.
Constant Value: 2 (0x00000002)
CONSTELLATION_UNKNOWN
public static final int CONSTELLATION_UNKNOWN
Unknown constellation type.
Constant Value: 0 (0x00000000)
Fields
Public methods
describeContents
public int describeContents ()
Describe the kinds of special objects contained in this Parcelable
 instance's marshaled representation. For example, if the object will
 include a file descriptor in the output of writeToParcel(android.os.Parcel, int),
 the return value of this method must include the
 CONTENTS_FILE_DESCRIPTOR bit.
| Returns | |
|---|---|
| int | a bitmask indicating the set of special object types marshaled
 by this Parcelable object instance.
 Value is either 0orCONTENTS_FILE_DESCRIPTOR | 
equals
public boolean equals (Object o)
Indicates whether some other object is "equal to" this one.
 The equals method implements an equivalence relation
 on non-null object references:
 
- It is reflexive: for any non-null reference value
     x,x.equals(x)should returntrue.
- It is symmetric: for any non-null reference values
     xandy,x.equals(y)should returntrueif and only ify.equals(x)returnstrue.
- It is transitive: for any non-null reference values
     x,y, andz, ifx.equals(y)returnstrueandy.equals(z)returnstrue, thenx.equals(z)should returntrue.
- It is consistent: for any non-null reference values
     xandy, multiple invocations ofx.equals(y)consistently returntrueor consistently returnfalse, provided no information used inequalscomparisons on the objects is modified.
- For any non-null reference value x,x.equals(null)should returnfalse.
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| Parameters | |
|---|---|
| o | Object: the reference object with which to compare. | 
| Returns | |
|---|---|
| boolean | trueif this object is the same as the obj
          argument;falseotherwise. | 
getAzimuthDegrees
public float getAzimuthDegrees (int satelliteIndex)
Retrieves the azimuth the satellite at the specified index.
| Parameters | |
|---|---|
| satelliteIndex | int: An index from zero togetSatelliteCount()- 1
 Value is 0 or greater | 
| Returns | |
|---|---|
| float | Value is between 0.0f and 360.0f inclusive | 
getBasebandCn0DbHz
public float getBasebandCn0DbHz (int satelliteIndex)
Retrieves the baseband carrier-to-noise density of the satellite at the specified index in dB-Hz.
| Parameters | |
|---|---|
| satelliteIndex | int: An index from zero togetSatelliteCount()- 1
 Value is 0 or greater | 
| Returns | |
|---|---|
| float | Value is between 0.0f and 63.0f inclusive | 
getCarrierFrequencyHz
public float getCarrierFrequencyHz (int satelliteIndex)
Gets the carrier frequency of the signal tracked.
For example it can be the GPS central frequency for L1 = 1575.45 MHz, or L2 = 1227.60 MHz, L5 = 1176.45 MHz, varying GLO channels, etc.
The value is only available if hasCarrierFrequencyHz(int) is
 true.
| Parameters | |
|---|---|
| satelliteIndex | int: An index from zero togetSatelliteCount()- 1
 Value is 0 or greater | 
| Returns | |
|---|---|
| float | Value is 0.0f or greater | 
getCn0DbHz
public float getCn0DbHz (int satelliteIndex)
Retrieves the carrier-to-noise density at the antenna of the satellite at the specified index in dB-Hz.
| Parameters | |
|---|---|
| satelliteIndex | int: An index from zero togetSatelliteCount()- 1
 Value is 0 or greater | 
| Returns | |
|---|---|
| float | Value is between 0.0f and 63.0f inclusive | 
getConstellationType
public int getConstellationType (int satelliteIndex)
Retrieves the constellation type of the satellite at the specified index.
| Parameters | |
|---|---|
| satelliteIndex | int: An index from zero togetSatelliteCount()- 1
 Value is 0 or greater | 
| Returns | |
|---|---|
| int | Value is CONSTELLATION_UNKNOWN,CONSTELLATION_GPS,CONSTELLATION_SBAS,CONSTELLATION_GLONASS,CONSTELLATION_QZSS,CONSTELLATION_BEIDOU,CONSTELLATION_GALILEO, orCONSTELLATION_IRNSS | 
getElevationDegrees
public float getElevationDegrees (int satelliteIndex)
Retrieves the elevation of the satellite at the specified index.
| Parameters | |
|---|---|
| satelliteIndex | int: An index from zero togetSatelliteCount()- 1
 Value is 0 or greater | 
| Returns | |
|---|---|
| float | Value is between -90.0f and 90.0f inclusive | 
getSatelliteCount
public int getSatelliteCount ()
Gets the total number of satellites in satellite list.
| Returns | |
|---|---|
| int | Value is 0 or greater | 
getSvid
public int getSvid (int satelliteIndex)
Gets the identification number for the satellite at the specific index.
This svid is pseudo-random number for most constellations. It is FCN & OSN number for Glonass.
The distinction is made by looking at constellation field
 getConstellationType(int) Expected values are in the range of:
 
- GPS: 1-32
- SBAS: 120-151, 183-192
- GLONASS: One of: OSN, or FCN+100
 - 1-25 as the orbital slot number (OSN) (preferred, if known)
- 93-106 as the frequency channel number (FCN) (-7 to +6) plus 100. i.e. encode FCN of -7 as 93, 0 as 100, and +6 as 106
 
- QZSS: 183-206
- Galileo: 1-36
- Beidou: 1-63
- IRNSS: 1-14
| Parameters | |
|---|---|
| satelliteIndex | int: An index from zero togetSatelliteCount()- 1
 Value is 0 or greater | 
| Returns | |
|---|---|
| int | Value is between 1 and 206 inclusive | 
hasAlmanacData
public boolean hasAlmanacData (int satelliteIndex)
Reports whether the satellite at the specified index has almanac data.
| Parameters | |
|---|---|
| satelliteIndex | int: An index from zero togetSatelliteCount()- 1
 Value is 0 or greater | 
| Returns | |
|---|---|
| boolean | |
hasBasebandCn0DbHz
public boolean hasBasebandCn0DbHz (int satelliteIndex)
Reports whether a valid getBasebandCn0DbHz(int) is available.
| Parameters | |
|---|---|
| satelliteIndex | int: An index from zero togetSatelliteCount()- 1
 Value is 0 or greater | 
| Returns | |
|---|---|
| boolean | |
hasCarrierFrequencyHz
public boolean hasCarrierFrequencyHz (int satelliteIndex)
Reports whether a valid getCarrierFrequencyHz(int) is available.
| Parameters | |
|---|---|
| satelliteIndex | int: An index from zero togetSatelliteCount()- 1
 Value is 0 or greater | 
| Returns | |
|---|---|
| boolean | |
hasEphemerisData
public boolean hasEphemerisData (int satelliteIndex)
Reports whether the satellite at the specified index has ephemeris data.
| Parameters | |
|---|---|
| satelliteIndex | int: An index from zero togetSatelliteCount()- 1
 Value is 0 or greater | 
| Returns | |
|---|---|
| boolean | |
hashCode
public int hashCode ()
Returns a hash code value for the object. This method is
 supported for the benefit of hash tables such as those provided by
 HashMap.
 
 The general contract of hashCode is:
 
- Whenever it is invoked on the same object more than once during
     an execution of a Java application, the hashCodemethod must consistently return the same integer, provided no information used inequalscomparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
- If two objects are equal according to the equalsmethod, then calling thehashCodemethod on each of the two objects must produce the same integer result.
- It is not required that if two objects are unequal
     according to the equalsmethod, then calling thehashCodemethod on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
| Returns | |
|---|---|
| int | a hash code value for this object. | 
usedInFix
public boolean usedInFix (int satelliteIndex)
Reports whether the satellite at the specified index was used in the calculation of the most recent position fix.
| Parameters | |
|---|---|
| satelliteIndex | int: An index from zero togetSatelliteCount()- 1
 Value is 0 or greater | 
| Returns | |
|---|---|
| boolean | |
writeToParcel
public void writeToParcel (Parcel parcel, int flags)
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
| parcel | Parcel: This value cannot benull. | 
| flags | int: Additional flags about how the object should be written.
 May be 0 orParcelable.PARCELABLE_WRITE_RETURN_VALUE.
 Value is either0or a combination ofParcelable.PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES | 
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
