How to preserve state in case of long press BTN3 #5521
Replies: 1 comment
-
Posted at 2023-01-05 by @thyttan Short answer you don't :p Slightly longer answer: The classical and standard way of navigating between apps is calling the Recently But.. You also have Posted at 2023-01-05 by !evil Thank you for the details, I feared as much. The use case is: Every 30s check if the watch is in power save mode. Remember this to keep track of recent activity and act accordingly. Related issues: For this particular use case (any activity in the last 10m), resetting the history is not a problem because BTN3 reset is activity and clearing the history does lead to the same behavior (assuming activity by default). However, this is usually an exception rather than the norm. Regarding Posted at 2023-01-06 by @allObjects @thyttan, I guess you mean lines #274..278 and #303... Posted at 2023-01-06 by @thyttan Actually yes and no :P I meant what I wrote but it's outdated on the latest version of BW Clock. Here's a link to Line #437 on the version I was looking at at the time . So the old version shows the straight forward way to do it when not utilizing fast loading, while the new version works with fast loading. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2023-01-05 by !evil
Hi,
in most apps, long pressing BTN3 gets you back to default UI. It performs a lot more than just unloading the current app and loading the clock app. It even executes
*.boot.js
files. How would you write a "background" app which actually initializes just once and provides some state for the duration of power on?Beta Was this translation helpful? Give feedback.
All reactions