M Mike1970 Well-Known Member Licensed User Longtime User May 14, 2019 #1 https://www.b4x.com/android/forum/threads/background-location-tracking.99873/ Hello, i read this post, and i noticed that the process will run for ever even if you close the app. I need to have the service running until i have the app opened (also in background) but i need to stop it when i close it (close from the recent application).
https://www.b4x.com/android/forum/threads/background-location-tracking.99873/ Hello, i read this post, and i noticed that the process will run for ever even if you close the app. I need to have the service running until i have the app opened (also in background) but i need to stop it when i close it (close from the recent application).
josejad Expert Licensed User Longtime User May 14, 2019 #2 Maybe you can use in the tracking service? Not sure, test it. Code: Sub Service_TaskRemoved 'This event will be raised when the user removes the app from the recent apps list. End Sub Upvote 0
Maybe you can use in the tracking service? Not sure, test it. Code: Sub Service_TaskRemoved 'This event will be raised when the user removes the app from the recent apps list. End Sub
M Mike1970 Well-Known Member Licensed User Longtime User May 14, 2019 #3 José J. Aguilar said: Maybe you can use in the tracking service? Not sure, test it. Code: Sub Service_TaskRemoved 'This event will be raised when the user removes the app from the recent apps list. End Sub Click to expand... Thanks you!! It worked, i had to handle all the thing from the StartService and not in the TrackerService Code: Sub Service_TaskRemoved StopService(Tracker) End Sub Upvote 0
José J. Aguilar said: Maybe you can use in the tracking service? Not sure, test it. Code: Sub Service_TaskRemoved 'This event will be raised when the user removes the app from the recent apps list. End Sub Click to expand... Thanks you!! It worked, i had to handle all the thing from the StartService and not in the TrackerService Code: Sub Service_TaskRemoved StopService(Tracker) End Sub