cph-cachet / flutter-plugins

A collection of Flutter plugins developed by CACHET
551 stars 681 forks source link

[HEALTH 8.1.0] Unable to retrieve steps for certain Android Device #991

Closed tajjacob closed 4 months ago

tajjacob commented 5 months 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:

NB: Bugs pertaining to old devices/OS versions will likely not be fixed.

Describe the bug

Cannot retrieve steps data for mentioned device. Meanwhile there is no issue on retrieving steps data for other devices, android and ios

To Reproduce

steps = await health.getTotalStepsInInterval(midnight, now);

Expected behavior

supposed retrieved steps data from google fit

Actual behavior

Refer to screenshot for the error

Screenshots

Screenshot 2024-06-26 at 4 33 57 PM

Flutter doctor

Please run flutter doctor and add the output here.

image

Additional information

Add any other info about the problem here.

tajjacob commented 4 months ago

After update to version 10.2.0 the issue still occured on certain android device. as per screenshot below, I tested this in android device model: OPPO Reno 4.

image

I also tested on redmi note 10 pro and no issue with this device as shown in screenshot below.

image
tajjacob commented 4 months ago

solution: its written in the readme. My bad. Maybe they updated the readme. in latest version. just add permission handler plugin and this line:

await Permission.activityRecognition.request();