Google Fit API: ApiException 17 (Fitness.CLIENT is not available on this device)
hrsalehi opened this issue · comments
I configured Google fit api and followed "Getting Started" section of google docs. But when I trying to read "Steps" data I face "Google Fit API: ApiException 17 (Fitness.CLIENT is not available on this device)" exception in Task
object callback from getRecordingClient
Fitness.getRecordingClient(context, GoogleSignIn.getLastSignedInAccount(context))
.subscribe(DataType.TYPE_STEP_COUNT_CUMULATIVE)
.addOnCompleteListener(
new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
if (task.isSuccessful()) {
Log.i(LOG_TAG, "Successfully subscribed!");
} else {
Log.w(LOG_TAG, "There was a problem subscribing.", task.getException());
}
}
});
I am closing this issue/PR, as it has been migrated to the new repo linked above in the comments. Thank you!