-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reuse last timer picked by the user #30
Comments
We can use either the object store (CIQ devices < 3.x) or AppSettings (CIQ >= 3.x) to store the list of timers and settings. Both things provide the same kind of functionality (key/value store of app data) but have slightly different ways of doing it. Also, I think AppSettings is the only thing that allows for companion app configuration of the values but I'm not really sure. |
I was digging into the Storage (https://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Application/Storage.html#setValue-instance_method) and it is only available in SDK >2.4. I am realizing that my FR235 is super old and limited. This is a strong case to upgrade my watch. On the other hand, if we write the code for the oldest SDK then it works everywhere. Another idea would be to maintain a basic app for old devices (e.g., dynamic-entries). And start a new one in the app store for modern devices (i.e., Menu2, Object Store, etc). |
This thread is helpful. I will work on this to persist on older devices.
|
Even now that we can persist the last timeout, the time selector does not allow to set focus on an entry. Even if we created a custom menu (https://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/WatchUi/Menu.html) this would not work easily because the menu is set to the first item all the time (i.e., Stop). Menu2 allows it (https://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/WatchUi/Menu2.html#setFocus-instance_method). This would be super clean. Another option would be to have a "Stop, Last Timeout, 1, 2, ..., Custom." |
It's probably easier to just store in the settings a dictionary of steak index -> timer value. Then, when the apps starts up just restore all the timers to whatever duration they were the last time the app was run. That way users can configure potentially all of the available timers for specific uses and those become the default values. |
This is also very similar to what the built-in timer or alarm apps do. We don't have to add much to the UI, it makes sense and won't surprise anyone if the app starts up and has the timeout values from the last run. We would need to modify the duration picker to allow setting a time in it but that's not too bad. |
I really like the pulling of custom timers specific to that user. That's super useful. I would totally benefit from that. I'm creating right now a custom Menu with the pulling of timers from the datastore. I hope to get this going today to have a proof of concept. |
This is working now. Closing. |
Chances are that picking the last time is better than starting with a default value. This way is more natural to the cooking habits of each user.
I wonder if an app can write/read data from the watch filesystem. This would be a way to persist the last timer.
The text was updated successfully, but these errors were encountered: