Android Google Fit Unable to Read Blood Pressure Value

前端 未结 1 1913
旧巷少年郎
旧巷少年郎 2021-01-15 00:23

I have tried to read Blood pressure value from Google Fit using Android code but unable to read value and returns the below logs

Blood Pressure Log:

1条回答
  •  再見小時候
    2021-01-15 01:09

    Use builder like this:

    return new DataReadRequest.Builder()
                            .aggregate(HealthDataTypes.TYPE_BLOOD_PRESSURE,HealthDataTypes.AGGREGATE_BLOOD_PRESSURE_SUMMARY)
                            .bucketByTime(1, TimeUnit.DAYS) //important thing
                            .setTimeRange(startTime, endTime, TimeUnit.MILLISECONDS)
                            .enableServerQueries()
                            .build();
    

    0 讨论(0)
提交回复
热议问题