You are reading a single comment by @pancake and its replies. Click here to read the full conversation.
  • I'm writing a "breath" app. I find out after writing it that there was already one in the apps repository, but my app fits better my needs so i'll finish it and publish it when ready.

    But i'm facing an issue that i don't know yet how to solve it:

    • I want the app to start ever hour (maybe configurable)
    • Ideally I would like to skip starting the app when i'm sleeping (is there a way to determine if the user is sleeping? i know the bangle can count steps without draining battery. is there a way to do the same but in order to determine if the user is awake or sleeping without draining battery?
    • I found the sched library provides an api to set alarms, and the alarm object can ship a js field that contains a js oneliner that can be used to execute an app.

    What would be the most optimal way to do this?

About

Avatar for pancake @pancake started