Android Question Can't fully stop GPS

MrKim

Well-Known Member
Licensed User
Longtime 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.
 

Attachments

  • GPSTest.zip
    9.7 KB · Views: 168

MrKim

Well-Known Member
Licensed User
Longtime 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.
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.
 
Upvote 0
Top