Broadcast action for GPS state changed

Last Updated:

  1. duonginfo

    duonginfo Member

    I create a app that i want to catch the GPS on/off event.How do i find out the GPS device enable through GPS_EVENT_STARTED and GPS_EVENT_STOPED.Is there the broadcast action for GPS state changed?
    Thank for your reading!

  2. vladimirov

    vladimirov Member

    I didn't see this ability, but you can make a service that contains GPS listener with overridden next method

    public void onProviderEnabled(String provider)
    public void onProviderDisabled(String provider)

    and you can send broadcasts yourself from them
    duonginfo likes this.
  3. duonginfo

    duonginfo Member

    thank you vladimirov.It's helpful.

Share This Page