5
Google Fitに接続して体重データを読むことはできますが、Google Fit Webで見ることができるデータのすべてを読み取ることはできません。私は何かデータソースに間違っていると信じていますが、わかりません。読書のためのコードは次のとおりです。Google Fitで体重を読む
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);