Stay organized with collections
Save and categorize content based on your preferences.
GpsStatus.Listener
public
static
interface
GpsStatus.Listener
android.location.GpsStatus.Listener
|
This interface was deprecated
in API level 24.
Use GnssStatus.Callback
instead.
Used for receiving notifications when GPS status has changed.
Summary
Public methods |
abstract
void
|
onGpsStatusChanged(int event)
Called to report changes in the GPS status.
|
Public methods
onGpsStatusChanged
public abstract void onGpsStatusChanged (int event)
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](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nDeprecated in [API level\n24](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nGpsStatus.Listener\n==================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/location/GpsStatus.Listener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nGpsStatus.Listener\n`\n\n\n`\n\n\n`\n\n|-------------------------------------|\n| android.location.GpsStatus.Listener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\n**This interface was deprecated\nin API level 24.** \n\nUse [GnssStatus.Callback](/reference/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 void` | ` `[onGpsStatusChanged](/reference/android/location/GpsStatus.Listener#onGpsStatusChanged(int))`(int event) ` Called to report changes in the GPS status. |\n\nPublic methods\n--------------\n\n### onGpsStatusChanged\n\nAdded in [API level 3](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onGpsStatusChanged (int event)\n```\n\nCalled to report changes in the GPS status.\nThe event number is one of:\n\n- [GpsStatus.GPS_EVENT_STARTED](/reference/android/location/GpsStatus#GPS_EVENT_STARTED)\n- [GpsStatus.GPS_EVENT_STOPPED](/reference/android/location/GpsStatus#GPS_EVENT_STOPPED)\n- [GpsStatus.GPS_EVENT_FIRST_FIX](/reference/android/location/GpsStatus#GPS_EVENT_FIRST_FIX)\n- [GpsStatus.GPS_EVENT_SATELLITE_STATUS](/reference/android/location/GpsStatus#GPS_EVENT_SATELLITE_STATUS)\n\nWhen this method is called, the client should call [LocationManager.getGpsStatus](/reference/android/location/LocationManager#getGpsStatus(android.location.GpsStatus)) to get additional status information.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|--------------------------------------------------|\n| `event` | `int`: event number for this notification \u003cbr /\u003e |"]]