I'm coming back to Connect IQ/Monkey C after a few years - back then I only created custom data fields and never attempted a full-blown app, the API/SDK has also changed a lot since then.
I want to write a Fartlek app (I'm pretty sure a full-blown application is the only way!) that randomly creates new laps based on time intervals in seconds (e.g. a random value between 25 seconds and 180 seconds/3 mins).
Here's an approximate sequence of what I eventually want to achieve if the above isn't clear (I'll keep it simple) - I'm not asking for help on every part, just the creation of randomly laps specifically.
1. User presses start on the watch.
2. Use a hardcoded 'recovery' time e.g. 30 secs
3. When the 30 secs are over - a new lap is created which represents the Fartlek 'effort' (the user does NOT see how long this lasts - that's the point)
3.1 After a randomly generated time from 25-180 secs, a new lap is created which represents the recovery 30 seconds.
4. Repeart 2 to 3.1 until user presses stop on the watch.
I'm not asking for full code or anything of the sort, but can the generation of random laps be easily added to the SDK project 'RecordSample'?
If so, is it as simple as somehow calling the ActivityRecording.Session object's addLap method after I've generated my random timer. Where in code would I do this - is it onUpdate()?
Much appreciated for any guidance on this!
Crystal.