I followed the following tutorial and it works fine, the question is, can everything be canceled automatically when the app is closed? What I want is for it to only work when the app is open.
The problem is that when the user closes the app the service continues to work, if I do it another way the app tries to start the service when it is already started and gets stuck.
Thanks
The problem is that when the user closes the app the service continues to work, if I do it another way the app tries to start the service when it is already started and gets stuck.
Background location tracking
Simple example of a foreground service that keeps the process running in the background. The current location is shown in the persistent notification. The app starts at boot and theoretically should run all the time. It also schedules itself to run with StartServiceAt. This can help in cases...
www.b4x.com
Thanks