Google Fit API: ApiException 17 (Fitness.CLIENT is not available on this device)

前端 未结 1 994
野的像风
野的像风 2021-02-14 13:14

The Google Play documentation claims this is an API_NOT_CONNECTED code, however I have done everything I (think I) have to do in order to access the Google Fit API.

Atte

相关标签:
1条回答
  • 2021-02-14 13:51

    Do you use the latest version of Google Play Services?

    You can check it by invoking the next code:

    private void checkForUpdates() {
        GoogleApiAvailability availability = GoogleApiAvailability.getInstance();
        int resultCode = availability.isGooglePlayServicesAvailable(this);
        if (resultCode == ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED) {
            availability.getErrorDialog(this, resultCode, REQUEST_CODE).show();
        }
    }
    
    0 讨论(0)
提交回复
热议问题