keep state across invocations
#1
In InfiniTime, is there a way for my screen (app) to maintain some state across invocations? E.g. for app settings, but also for a stopwatch/timer that can resume even if the user switched to another screen and back. I would just store the time point at which the stopwatch/timer started, and then recompute the elapsed/remaining time from the current time point when it is reopened.
  Reply
#2
I managed to do it by adding a new controller just for my app, taking inspiration from the Timer app.

The controllers implementations live in src/components, the structure that holds them all is in src/displayapp/Controllers.h, and they are created / stored by src/displayapp/DisplayApp.{h,cpp}
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Article: Flutter State Management with Bloc for PineTime Companion App lupyuen 2 5,494 06-27-2020, 05:26 PM
Last Post: lupyuen

Forum Jump:


Users browsing this thread: 1 Guest(s)