S Scantech Well-Known Member Licensed User Longtime User Aug 1, 2019 #1 I have an app that tracks Distance and by exiting app or every 2 minutes it will store the data in a file. My question is when the app is restarted i like to find a way to store the data in the file before it is being destroyed. Is there a way? By the way, the service module is running and does file saving every 2 minutes.
I have an app that tracks Distance and by exiting app or every 2 minutes it will store the data in a file. My question is when the app is restarted i like to find a way to store the data in the file before it is being destroyed. Is there a way? By the way, the service module is running and does file saving every 2 minutes.
DonManfred Expert Licensed User Longtime User Aug 2, 2019 #2 B4X: Sub Service_TaskRemoved 'This event will be raised when the user removes the app from the recent apps list. End Sub I dont know whether you are able to save the data here. You need to try. Upvote 0
B4X: Sub Service_TaskRemoved 'This event will be raised when the user removes the app from the recent apps list. End Sub I dont know whether you are able to save the data here. You need to try.
S Scantech Well-Known Member Licensed User Longtime User Aug 3, 2019 #3 DonManfred said: B4X: Sub Service_TaskRemoved 'This event will be raised when the user removes the app from the recent apps list. End Sub I dont know whether you are able to save the data here. You need to try. Click to expand... That's a negative. Will not trigger with either force stop or restarting. Tested with Android 7, I will try Android 8 later on Upvote 0
DonManfred said: B4X: Sub Service_TaskRemoved 'This event will be raised when the user removes the app from the recent apps list. End Sub I dont know whether you are able to save the data here. You need to try. Click to expand... That's a negative. Will not trigger with either force stop or restarting. Tested with Android 7, I will try Android 8 later on
Erel B4X founder Staff member Licensed User Longtime User Aug 3, 2019 #4 Write the data to a SQL database. It will always be persisted. Upvote 0