I have a watch app, which gathers health data through the watches sensors, in order to monitor unwell patients. The data is used in a dashboard online, for care givers to use.
I have been trying to figure out how I can get hold of sleep data. I am a bit in doubt with what I’ve found, so I hope you can help.
From what I’ve gathered, it seems that I can’t gather sleep data directly from the watch. It is possible to gather sleep data from Samsung Health, via Health Connect. This might not be possible from the watch though. Is all of this correct?
The watch app I’m working on, continually gathers data, so I want to read last nights sleep data and upload it to the cloud I’m using ones a day. Can I do that?
I would prefer to do it without needing a mobile app, but if it is not possible with just the watch app, can I do it through a mobile app then?
It should work for watch also.
Try the code for your watch as well.
If you found issues, then report this to Developer Support for official 1on1 communication.
I tested it on both my emulator and my Galaxy 5 Pro, both giving the same SDK_UNAVAILABLE exception. They run WearOS API 34, which should be updated enough, so I expected it to be a matter of just not being able to run on watch.