Broadcast action for GPS state changed


Last Updated:

  1. duonginfo

    duonginfo Member This Topic's Starter

    Joined:
    May 12, 2010
    Messages:
    16
    Likes Received:
    0
    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!
     

    Advertisement
  2. vladimirov

    vladimirov Member

    Joined:
    Apr 26, 2010
    Messages:
    17
    Likes Received:
    2
    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 This Topic's Starter

    Joined:
    May 12, 2010
    Messages:
    16
    Likes Received:
    0
    thank you vladimirov.It's helpful.
     

Share This Page

Loading...