I want to read step count data each month from google fit, but the Google fit API is not supported by TimeUnit.YEAR, see:
new DataReadRequest.Builder()
.aggregate(DataType.AGGREGATE_STEP_COUNT_DELTA, DataType.AGGREGATE_STEP_COUNT_DELTA)
.bucketByTime(30,TimeUnit.DAYS)
.setTimeRange(calendar.getTimeInMillis(),endCalendar.getTimeInMillis() , TimeUnit.MILLISECONDS)
.build()
I just can get data by each 30 days, not a month. Cause a month maybe have 28,29,30 or 31 days
So is there any way to get it ?