While it’s great to have this api I think it needs some improvements:
HTTP API
There’s already one, but not documented. So, it would be nice to document also the HTTP API as it’s used by SleepAsFitbit, even though it matches quite a lot the the intents API.
Alarm management
I’d love to have the support for some simple alarm management from wearables.
Captured data batch syncs
This is quite important IMHO, some devices may be able to keep apps monitoring all the night long, but not to communicate with their companion app all the times, or the companion might crash or the phone for some reason stop working (battery is over?!), or just the bluetooth communication stop.
In such cases, all the data that the wearable might have collected is just LOST.
As per this, it would be quite important to introduce APIs to allow wearables to send “catchup data” (so timestamped sensor values) whenever they want so that Sleep as Android can be able to fetch those once active, and aggregate them together.
This may also allow saving energy on the phone and wearables, as it will reduce the bluetooth traffic and the phone background activity.
Not only, you could even just record a night from your watch and then sync it with sleep as android as soon as you can (imagine you went somewhere without your phone).
At the end, while you’re sleeping you don’t care about having the data saved promptly, while you do care about having the correct results in the morning. And while it’s true that SaA is more about having a good sleep and better wake up, if something failed reading your sensors, you may still care about having the right data shown.