Comments (8)
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.
from barbecueboss.
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.
from barbecueboss.
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).
from barbecueboss.
This thread is helpful. I will work on this to persist on older devices.
https://forums.garmin.com/developer/connect-iq/f/q-a/211780/comprehensive-list-of-supported-ciq-versions-per-watch-past-and-future/995185#995185
getProperty()/setProperty can be used on older devices, and to determine with you can use:
if(Application has :Storage) { } else { }
from barbecueboss.
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."
from barbecueboss.
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.
from barbecueboss.
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.
from barbecueboss.
This is working now. Closing.
from barbecueboss.
Related Issues (20)
- darth vader / rey / capt marvel watches need some UI work HOT 9
- [Memory] D2 Bravo runs out of memory on switch to SteakMenu HOT 7
- [GUI] Progressbar - adjust for all watches
- [Bug] Approach S60 crashes on SteakMenuDelegate.mc:45 HOT 8
- [CIQ1] TotalTimeMenu Duration Custom Picker HOT 1
- [Memory] fenix3 and fenix3_hr HOT 2
- [Refactoring] isSmoking param for SmokeLayout is not needed HOT 1
- FR630 button layout is different HOT 2
- [low-n-slow] Temperature probe layouts
- Long press HOT 4
- Venu's layout is different
- refactor resources to include the bare minimum required for devices HOT 1
- Tenergy submodule build
- [Tenergy] ProfileRegistrationException: Too Many Profiles HOT 6
- [Tenergy/Simulator] Device Scan - takes long to acquire the sensor in the simulator HOT 4
- [Tenergy/Simulator] Device Scan Crash HOT 3
- [Tenergy] Custom timer should allow hh:mm:ss format HOT 4
- [Menu2] How to dynamically update a MenuItem HOT 2
- [Low-n-slow] Thermometer data reliability metric/icon HOT 1
- implement jungle file annotation excludes for all devices HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from barbecueboss.