Search code examples
androidgpspreferenceactivity

Android Listen For Change in GPS Status?


Hello I need to know how to listen for the following with the GPS in Android so I can update the UI in a PreferenceActivity. I have tried GpsStatus.Listener with nothing happening.

  • GpsStatus.GPS_EVENT_STARTED
  • GpsStatus.GPS_EVENT_STOPPED

Any suggestions would be great.


Solution

  • Looked at the source code for the system settings app and how they did it and implemented it into my app and it works great. @SKJ thx for the help but sadly I couldn't get the GpsStatus.Listener to work the source code works perfectly.