flutter-plugins icon indicating copy to clipboard operation
flutter-plugins copied to clipboard

health 3.0.4 no data retrieving from google fit

Open tommasini opened this issue 3 years ago • 15 comments

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:

  • Device: huawei p30 pro
  • OS: Android 11.0

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

tommasini avatar May 30 '21 21:05 tommasini

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.

andreferreiravntrs avatar Jun 08 '21 10:06 andreferreiravntrs

This is still happening on version 3.0.6

vietmy1711 avatar Jun 09 '21 14:06 vietmy1711

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

ghzeni avatar Jun 21 '21 01:06 ghzeni

this is a fix #372

Sensirex avatar Jun 28 '21 06:06 Sensirex

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.

rohitranjan1991 avatar Jun 30 '21 14:06 rohitranjan1991

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

tommasini avatar Jun 30 '21 16:06 tommasini

@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

hasan-abul avatar Jul 05 '21 08:07 hasan-abul

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

Sensirex avatar Jul 08 '21 03:07 Sensirex

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.

AhmedHamdan54 avatar Jul 14 '21 12:07 AhmedHamdan54

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?

gandruszkiewicz avatar Jul 27 '21 10:07 gandruszkiewicz

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 avatar Jul 28 '21 07:07 Sensirex

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.

Sensirex avatar Jul 28 '21 07:07 Sensirex

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.

derekpitts28 avatar Aug 19 '21 22:08 derekpitts28

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]

LarYoungruu avatar Aug 25 '21 12:08 LarYoungruu

same issue!

deremakif avatar Nov 16 '21 14:11 deremakif