Android Question Can't fully stop GPS

Discussion in 'Android Questions' started by MrKim, Aug 21, 2015.

  1. MrKim

    MrKim Active Member Licensed User

    When I run the GPS example program when the program closes the the 'Location' icon in the notification bar goes away. When I run the GPS as a service in my app the icon remains even after I Stop GPS in the Service_Destroy event. It even remains when you close the activity. All I want to do is get the speed periodically (every 1-5 minutes). After that I want it gone completely. I am using a separate sticky service to start the GPS service. Thanks in advance for any help. I have enclosed an example program.

    Attached Files:

  2. Erel

    Erel Administrator Staff Member Licensed User

    Your code calls GPS.Start multiple times. You can call GPS.Stop before you call GPS.Start. Though it will be better to manage the state correctly and only start the GPS when it is needed.
  3. MrKim

    MrKim Active Member Licensed User

    Thank you Erel! Sigh, things I just don't think about having to deal with in VBA. This is making me realize how sloppy a coder I am.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice