Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Detect "Do Not Disturb" or "Sleep Mode" using API?

As the title asks, does anyone know a way to detect either "Do Not Disturb" or "Sleep Mode" using the SDK API?

 

I've written a clockface for which you can assign haptic feedback to heart rate zone change events, but I'm aiming to prevent this happening when overridden with either of these modes. Currently I need to override the haptics via a Companion setting. An alternative might be to allow time-based overrides in the settings, but this seems a giant kludge for something I just can't find in the API reference.

 

Maybe one for the API developers to consider adding, unless anyone has a tip about how to achieve this?

Best Answer
2 REPLIES 2

It seems like thoses modes would be found in the user settings API which is not there so its likely you cannot.

 

For the sleep mode, would it be best to deactivate it based on if you are recently doing steps or not?

 

If someone is sleeping they would not have made any steps recently (within like the past 15 min) so if their heart rate spikes suddenly the haptic would be deactivated and not wake them up.

 

In regards to Do Not Disturb (which I assume is used mostly to disconnect from social things), would it be good to also automatically disconnect the haptic feedback? If people are using the clockface to keep track of their heart rate and to maybe notify them if it gets to high, I would imagine it would be bad to have it not notifying them. Someone might want to not be disturbed from texts but definitely want to be disturbed if their heart rate starts rising. But that would play into the sleeping scenario where someone might want to be woken up if the heart rate gets to high. So it seems like the best idea would just have a setting that activates or deactivates it.  But I do not know your target audience so all of that might not matter.

Best Answer
0 Votes

I think your idea of using a mixture of tracking of recent steps and custom settings is probably the best way to proceed in the circumstances, so thanks for the idea. I find it surprising these these modes aren't represented in the API (yet), but I'm sure I'm not the only one finding frustration at the lack of API maturity.

 

My audience for the clockface is primarily just myself, so there's no urgency/demand for this, but I made the clockface public to let others choose it if they want, and now I get the occasional feedback and feature request.

Best Answer
0 Votes