Android Question Force Stop or Restart question

Discussion in 'Android Questions' started by Scantech, Aug 1, 2019.

  1. Scantech

    Scantech Well-Known Member Licensed User

    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.
     
  2. DonManfred

    DonManfred Expert Licensed User

    Code:
    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.
     
  3. Scantech

    Scantech Well-Known Member Licensed User

    That's a negative.

    Will not trigger with either force stop or restarting. Tested with Android 7, I will try Android 8 later on
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Write the data to a SQL database. It will always be persisted.
     
    Scantech likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice