How to get user's daily activity goals?

71 Views Asked by At

In Wear OS 4, how can I obtain the user's daily goals for calories, steps, etc? I'd much rather avoid deprecated APIs such as Google Fit, phone-dependent APIs, optional apps, etc. I'm using Kotlin with SDK 34.

The data must be available because I can see it on my watch!

Bard and Bing both get it wrong (ie, their code won't build), and I can't find anything suitable in the Wear OS documentation. I would have thought that Health Services would have provided goal values, but I can only find event listeners that fire when goals are actually reached.

0

There are 0 best solutions below