Keep Timer run after System.exit for an app

Former Member
Former Member
Hello,

I developp an application to follow the evolution of the atmospheric pressure. I use a timer that work all 30 minutes and keep the value of the atmospheric pressure .
But, when I leave my application, timer seem to be stopped and when I start again application, my old values of pressure has been removed.


Is-it possible that the timer continue working in background task ?

Thanks,
Olivier
  • But, when I leave my application, timer seem to be stopped

    This is expected. This is not like an iPhone or Android device where the application just keeps running; when your application is closed, it is unloaded completely.

    The functionality you are looking for was part of the SDK for a release a while back (see AppBase.onEvent(), but it was removed. The Garmin staff have said it is something that they want to add back, but it hasn't happened yet.

    when I start again application, my old values of pressure has been removed.

    You need to store your data in the object store (see AppBase.setProperty() and AppBase.getProperty()). Save the array of values as you add to it, and read the old values when you open the application.
  • Former Member
    Former Member over 9 years ago
    Hello Travis,

    My application isn't very interesting if we can't have datas regularly.
    I'll wait for this evolution.

    Thank you very much !