cph-cachet / flutter-plugins

A collection of Flutter plugins developed by CACHET
550 stars 675 forks source link

health 3.0.4 no data retrieving from google fit #354

Open tommasini opened 3 years ago

tommasini commented 3 years ago

Remember to specify the plugin name in the title!

Device / Emulator and OS

Please complete the following information for each phone and/or emulator you're experiencing this bug on:

Describe the bug

When I request for data to google fit, it's always returning an empty array, I have everything working and the permissions were granted.

To Reproduce

Just need to copy and paste the code example, set up the OAuth key 2.0, install the health package and you can reproduce yourself.

Expected behavior

I expect the data that my google fit had, just some data would be perfect.

Actual behavior

Empty array

Flutter doctor

No issues found

ghost commented 3 years ago

I am having the same issue with this version. After accepting the consent screen informing that i am using a test application and allowing the data to be fetched. At the end the list always comes empty. Although i have steps data and been testing with wide time period.

vietmy1711 commented 3 years ago

This is still happening on version 3.0.6

ghzeni commented 3 years ago

I can retrieve steps on 3.0.4 for some reason, but not heart rate.

Sensirex commented 3 years ago

this is a fix

372

rohitranjan1991 commented 3 years ago

HI @Sensirex, Is this the fix for 3.0.6 or 3.0.4? Also does the heart rate bpm works with this fix ?? Thanks.

tommasini commented 3 years ago

Hello @Sensirex , isn't working for me, I re-installed the 3.0.6 and not working :'( Version 3.0.4 is not working as well, I will downgrade my flutter version to 1.22.6 and try it

hasan-abul commented 3 years ago

@tommasini @Sensirex @Cheddargt I am trying to use version health 3.0.4 I can authorize successfully, but i am not receiving any data. Could you help me please.

already raised issue please refer the below link

https://github.com/cph-cachet/flutter-plugins/issues/375#issue-936435662

Sensirex commented 3 years ago

HI @Sensirex, Is this the fix for 3.0.6 or 3.0.4? Also does the heart rate bpm works with this fix ?? Thanks.

this is for 3.0.6 and latest stable flutter I checked only sleep, steps, water and energy burned

@tommasini, @hasan-abul you could use fix from my repo and latest stable flutter

AhmedJHamdan commented 3 years ago

Hi @Sensirex I used your solution and now it gives me access but shows me No data to show everytime I am using the example code but adding the android 10 needed permissions, but it is still the same.

gandruszkiewicz commented 3 years ago

Hi @Sensirex. for 3.06 and the latest I have gotten "Authorization not granted". But for 3.0.4 I installed on device Google fit app, configure it and now i can get some data from health plugin. It makes sense because health plugin communicate with Google Fit API. Am I right?

Sensirex commented 3 years ago

Hi @Sensirex. for 3.06 and the latest I have gotten "Authorization not granted". But for 3.0.4 I installed on device Google fit app, configure it and now i can get some data from health plugin. It makes sense because health plugin communicate with Google Fit API. Am I right?

you got "Authorization not granted" because there are some mistakes in 3.06 for Android, you could use fix from my git or wait for new release of this plugin

Sensirex commented 3 years ago

Hi @Sensirex I used your solution and now it gives me access but shows me No data to show everytime I am using the example code but adding the android 10 needed permissions, but it is still the same.

If you got No data be sure that everything is ok (you have latest version of plugin, right scopes in your google cloud add) I didn't test for Android 10.

derekpitts28 commented 3 years ago

I am seeing the same issue where I have 13 steps in google fit, I am authorized to just get steps (with correct activity scope) and I have authorized successfully. I try to retrieve steps for the entire year and It only returns an empty list. Is there a certain amount of time we need to wait for google fit to sync to the cloud? How immediate should this be? Using Flutter version 3.1.1+1.

LarYoungruu commented 3 years ago

I am seeing the same issue where I have 13 steps in google fit, I am authorized to just get steps (with correct activity scope) and I have authorized successfully. I try to retrieve steps for the entire year and It only returns an empty list. Is there a certain amount of time we need to wait for google fit to sync to the cloud? How immediate should this be? Using Flutter version 3.1.1+1.

@Sensirex Same problem, I don't know if it's from Google's side or not? [3.1.1+1]

deremakif commented 3 years ago

same issue!