fit-samples
fit-samples copied to clipboard
Google Fit API: ApiException 17 (Fitness.CLIENT is not available on this device)
Issue by hrsalehi
Friday May 04, 2018 at 03:07 GMT
Originally opened as https://github.com/googlesamples/android-fit/issues/34
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());
}
}
});
Hey, I have lot of user with the same issue. Did you found a fix?
I'm facing this issue as well. Any resolution?
i was facing same issue and no refrence was available but according to : public static final int API_NOT_CONNECTED The client attempted to call a method from an API that failed to connect. Possible reasons include:
The API previously failed to connect with a resolvable error, but the user declined the resolution.
The device does not support GmsCore.
The specific API cannot connect on this device.
Constant Value: 17
from google docs , for a reason api is not available in device..
I am from Iran ! this service is restricted by google to Iranian users ! this was the reason finally ! when i using VPN for google auth the problem is resolve !
@mr-mamali I have received this issue for a user from Iran as well. The exception now makes sense. Thanks for your reply.
I am getting this error; I live in India, can someone help me