MrKim Well-Known Member Licensed User Longtime User Aug 21, 2015 #1 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 GPSTest.zip 9.7 KB · Views: 324
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.
Erel B4X founder Staff member Licensed User Longtime User Aug 21, 2015 #2 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. Upvote 0
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.
MrKim Well-Known Member Licensed User Longtime User Aug 21, 2015 #3 Erel said: 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. Click to expand... 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
Erel said: 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. Click to expand... 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.