Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fitness.getSleepAnalysis(dateSleep) returns empty array #99

Open
patriksharma opened this issue Apr 19, 2021 · 2 comments
Open

Fitness.getSleepAnalysis(dateSleep) returns empty array #99

patriksharma opened this issue Apr 19, 2021 · 2 comments

Comments

@patriksharma
Copy link

patriksharma commented Apr 19, 2021

I don't know what can be a reason here but getSteps is working fine and I'm getting steps from start to end date but not in case I try to get sleep analysis , any idea what can be a reason ?

 let dateSleep = 
      {startDate: '2020-04-01', endDate:'2021-04-19' };
 Fitness.getSleepAnalysis(dateSleep)
        .then((records) => {
          console.log("here came",records)
          //console.log("here",Fitness.SleepAnalysis.records)
          // Do something
        })
        .catch((error) => {
          console.log("here",error)
          // Do something
        });
      }
@djochim
Copy link

djochim commented Oct 6, 2021

We are facing the same issue. @patriksharma were you able to fix it?

@pancr9
Copy link

pancr9 commented Oct 13, 2021

Seeing the same issue. Getting empty array at

List<Object> sleepSessions = response.getSessions()
. Possibly something changed on the Google Fit side?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants