I have an app with Huawei Health SDK integrated. I applied some data Read/Write permission of Fitness and Health data. The app works fine for some of features like step count data. However, it reports following error when calling activityRecord API:
activityRecord failure 50005: Unknown authorization error
Can someone help?
You need to ensure that your app for Health Kit data has been approved, and the scope of Activity Record has been added in Signing in and Applying for permission.
It looks like the app has been approved for the access of some fitness and health data because the step count works on the app. However, it seems that you have not requested the “user activity records data” in Health Kit service.
You need to enable Read/Write for user activity records data in Motion record data as you did for other data. You can refer the link for the details on HMS SDK v5 or link on HMS SDK v6 error codes.
After the application is approved, please try again. Hope this fix the issue. If you still get the result code 50005 error, the HMS Core version may be too low. Please upgrade the HMS Core version.