This is the app I’m currently developing. It gets temperature/humidity values from a backend service via bluetooth and display it on the badger screen.
It goes like this in pseudo code:
- load state
- fetch new data from bluetooth → takes a few secs
- if the new data is very different from what’s in the state
- store it in the state
- refresh the display
- store the state
- set the alarm in 5 mins
- sleep waiting for the alarm or a button
It works fine when running. But when I start the app from the OS/menu. If the new data doesn’t trigger a refresh, one can think the app didn’t start at all, which is super annoying.
When starting, I’d like the display to be refreshed only, no bluetooth connection, no fetching data. I looked into the API, but I couldn’t find anything that would tell me the app was just freshly started from the OS/menu.
Any idea?