I am trying the BasicHistory Sample whis stores a data and then read it but in my case the code get stuck at the insert call.await call does not return anything i have tried usi
Have you requested the right permissions?
According to that Google Fit sample, it only requires permission for "Activity". If you change the data type used in that sample for other different, make sure you are setting right permissions. Read authorization section in Google Fit Doc for more information.
You can add several permissions just adding a new scope to client:
// Create the Google API Client
mClient = new GoogleApiClient.Builder(this)
.addApi(Fitness.API)
.addScope(new Scope(Scopes.FITNESS_ACTIVITY_READ_WRITE))
.addScope(new Scope(Scopes.FITNESS_BODY_READ_WRITE))
.addScope(new Scope(Scopes.FITNESS_LOCATION_READ_WRITE))
...