Android Question prevent "killing previous instance (main)"

Discussion in 'Android Questions' started by JDS, Dec 3, 2019 at 7:56 AM.

  1. JDS

    JDS Active Member Licensed User

  2. Erel

    Erel Administrator Staff Member Licensed User

    A properly built application should be able to handle this case.
    It is not possible to prevent it from happening.

    Which issue have you encountered?
     
  3. JDS

    JDS Active Member Licensed User

    We've got the situation that at a certain point that the driver is unloading his truck. We are timing this so we set date, time and a identifier (and save it to a file). The driver has to wait (and needs to get back a few menu's). However he gets there faster by swiping down and tap the notification. The app gets killed and starts but the "unloading" work is not ended.
    If the driver had used "back" than the "work" was properly ended.

    We want a chronologic time schedule of the driver.
    07:00 - 07:45 - driving
    07:45 - 07:55 - unloading
    07:55 - 08:10 - driving
    08:10 - 08:30 - pause
    etc.

    Any thoughts?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    1. Move whatever you can to the starter service.
    2. Save the UI state in Activity_Pause and restore it in Activity_Create.
     
  5. LucaMs

    LucaMs Expert Licensed User

  6. Erel

    Erel Administrator Staff Member Licensed User

    Yes.

    Tip: B4XView = View. It is just a cross platform wrapper above the same native objects.
     
    LucaMs 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