I can connect to Google Fit and read weight data, but not all the data that I can see on the Google Fit Web. I believe something is wrong with the data sources, but I'm not sure. Code to read:
Instant endTime = Instant.now(); Instant startTime = DateTime.now().minusYears(10).toInstant(); DataReadRequest readRequest = new DataReadRequest.Builder () .setTimeRange (startTime.getMillis(), endTime.getMillis(), TimeUnit.MILLISECONDS) .read (DataType.TYPE_WEIGHT) .build (); DataReadResult dataReadResult = Fitness.HistoryApi.readData(MyApp.mClient, readRequest).await (1, TimeUnit.MINUTES);
source share