# GnssStatus.Callback

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# Callback

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/location/GnssStatus.Callback "View this page in Java")  

```
abstract class Callback
```

|---|------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                               ||
| ↳ | [android.location.GnssStatus.Callback](https://developer.android.com/reference/kotlin/android/location/GnssStatus.Callback#) |

Used for receiving notifications when GNSS events happen.

## Summary

|                                                   Public constructors                                                    ||
|-----------------------------------------------------------------------------------------------------------------------|---|
| [Callback](https://developer.android.com/reference/kotlin/android/location/GnssStatus.Callback#Callback())`()` <br /> |

|                                                                                                                                                                                                    Public methods                                                                                                                                                                                                    ||
|----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onFirstFix](https://developer.android.com/reference/kotlin/android/location/GnssStatus.Callback#onFirstFix(kotlin.Int))`(`ttffMillis:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Called when the GNSS system has received its first fix since starting.                                      |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onSatelliteStatusChanged](https://developer.android.com/reference/kotlin/android/location/GnssStatus.Callback#onSatelliteStatusChanged(android.location.GnssStatus))`(`status:` `[GnssStatus](https://developer.android.com/reference/kotlin/android/location/GnssStatus)`)` Called periodically to report GNSS satellite status. |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onStarted](https://developer.android.com/reference/kotlin/android/location/GnssStatus.Callback#onStarted())`()` Called when GNSS system has started.                                                                                                                                                                              |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onStopped](https://developer.android.com/reference/kotlin/android/location/GnssStatus.Callback#onStopped())`()` Called when GNSS system has stopped.                                                                                                                                                                              |

## Public constructors

### Callback

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
Callback()
```

## Public methods

### onFirstFix

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onFirstFix(ttffMillis: Int): Unit
```

Called when the GNSS system has received its first fix since starting.

|                                                                 Parameters                                                                 ||
|--------------|------------------------------------------------------------------------------------------------------------------------------|
| `ttffMillis` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):the time from start to first fix in milliseconds. |

### onSatelliteStatusChanged

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onSatelliteStatusChanged(status: GnssStatus): Unit
```

Called periodically to report GNSS satellite status.

|                                                                              Parameters                                                                              ||
|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `status` | [GnssStatus](https://developer.android.com/reference/kotlin/android/location/GnssStatus):the current status of all satellites. This value cannot be`null`. |

### onStarted

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onStarted(): Unit
```

Called when GNSS system has started.  

### onStopped

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onStopped(): Unit
```

Called when GNSS system has stopped.