Stay organized with collections
Save and categorize content based on your preferences.
Listener
interface Listener
Used for receiving notifications when GPS status has changed.
Summary
Public methods |
abstract Unit |
Called to report changes in the GPS status.
|
Public methods
onGpsStatusChanged
abstract fun onGpsStatusChanged(event: Int): Unit
Deprecated: Deprecated in Java.
Called to report changes in the GPS status. The event number is one of:
When this method is called, the client should call
LocationManager.getGpsStatus
to get additional status information.
Parameters |
event |
Int: event number for this notification |
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-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# GpsStatus.Listener\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nListener\n========\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/location/GpsStatus.Listener \"View this page in Java\") \n\n```\ninterface Listener\n```\n\n|------------------------------------------|\n| [android.location.GpsStatus.Listener](#) |\n\n*** ** * ** ***\n\n| **This interface was deprecated in API level 24.**\n|\n| Use [GnssStatus.Callback](/reference/kotlin/android/location/GnssStatus.Callback) instead.\n\nUsed for receiving notifications when GPS status has changed.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onGpsStatusChanged](#onGpsStatusChanged(kotlin.Int))`(`event:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Called to report changes in the GPS status. |\n\nPublic methods\n--------------\n\n### onGpsStatusChanged\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onGpsStatusChanged(event: Int): Unit\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nCalled to report changes in the GPS status. The event number is one of:\n\n- [GpsStatus.GPS_EVENT_STARTED](/reference/kotlin/android/location/GpsStatus#GPS_EVENT_STARTED:kotlin.Int)\n- [GpsStatus.GPS_EVENT_STOPPED](/reference/kotlin/android/location/GpsStatus#GPS_EVENT_STOPPED:kotlin.Int)\n- [GpsStatus.GPS_EVENT_FIRST_FIX](/reference/kotlin/android/location/GpsStatus#GPS_EVENT_FIRST_FIX:kotlin.Int)\n- [GpsStatus.GPS_EVENT_SATELLITE_STATUS](/reference/kotlin/android/location/GpsStatus#GPS_EVENT_SATELLITE_STATUS:kotlin.Int)\n\nWhen this method is called, the client should call [LocationManager.getGpsStatus](/reference/kotlin/android/location/LocationManager#getGpsStatus(android.location.GpsStatus)) to get additional status information.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|----------------------------------------------------------------------------------------------------------------|\n| `event` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): event number for this notification |"]]