# GpsStatus.Listener

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

# Listener

*** ** * ** ***

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

```
interface Listener
```

|----------------------------------------------------------------------------------------------------------------------------|
| [android.location.GpsStatus.Listener](https://developer.android.com/reference/kotlin/android/location/GpsStatus.Listener#) |

*** ** * ** ***

| **This interface was deprecated in API level 24.**
|
| Use[GnssStatus.Callback](https://developer.android.com/reference/kotlin/android/location/GnssStatus.Callback)instead.

Used for receiving notifications when GPS status has changed.

## Summary

|                                                                                                                                                                           Public methods                                                                                                                                                                           ||
|--------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| abstract[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onGpsStatusChanged](https://developer.android.com/reference/kotlin/android/location/GpsStatus.Listener#onGpsStatusChanged(kotlin.Int))`(`event:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Called to report changes in the GPS status. |

## Public methods

### onGpsStatusChanged

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

```
abstract fun onGpsStatusChanged(event: Int): Unit
```

**Deprecated:** *Deprecated in Java.*

Called to report changes in the GPS status. The event number is one of:

- [GpsStatus.GPS_EVENT_STARTED](https://developer.android.com/reference/kotlin/android/location/GpsStatus#GPS_EVENT_STARTED:kotlin.Int)
- [GpsStatus.GPS_EVENT_STOPPED](https://developer.android.com/reference/kotlin/android/location/GpsStatus#GPS_EVENT_STOPPED:kotlin.Int)
- [GpsStatus.GPS_EVENT_FIRST_FIX](https://developer.android.com/reference/kotlin/android/location/GpsStatus#GPS_EVENT_FIRST_FIX:kotlin.Int)
- [GpsStatus.GPS_EVENT_SATELLITE_STATUS](https://developer.android.com/reference/kotlin/android/location/GpsStatus#GPS_EVENT_SATELLITE_STATUS:kotlin.Int)

When this method is called, the client should call[LocationManager.getGpsStatus](https://developer.android.com/reference/kotlin/android/location/LocationManager#getGpsStatus(android.location.GpsStatus))to get additional status information.

<br />

|                                                       Parameters                                                       ||
|---------|---------------------------------------------------------------------------------------------------------------|
| `event` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):event number for this notification |