android/fit-samples

Does Google Fit SDK work on WearOS?

ZhEgor opened this issue · 13 comments

Hi guys, I have two apps one for wearable and one for handheld device and we have mutual source of fit data - Google Fit. So when I request data on watches, I catch this exception on 57th line: 17: API: Fitness.CLIENT is not available on this device. Connection failed with: ConnectionResult{statusCode=INVALID_ACCOUNT, resolution=null, message=null}

Devices: Fossil Gen 6 (real device API 30, API 28), WearOS Small Round (Android Studio Emulator API 30)

I tried to run the same code on a phone app and I didin't receive an error. So I wonder, maybe didn't Google Fit API suppose to work on watches at all? If so, what workarounds can I use? Should I use Google Fit REST API?
Maybe someone has already encountered this problem, it would be useful to hear how they managed to deal with this.
Thanks in advance!