krokyze / FitKit

Flutter plugin for reading health and fitness data. Wraps HealthKit on iOS and GoogleFit on Android.
BSD 2-Clause "Simplified" License
98 stars 73 forks source link

Got the permission, but every array is empty, when it reads the data. #21

Closed janosdupai closed 4 years ago

janosdupai commented 4 years ago

Thank you for this awesome pub! I implemented it, and everything works fine in iOS, but somehow android device give me empty arrays, without any data. If I am right, I got the permission, and the console printing me every datatype, but it has an empty square bracket. Should I do any specific on android devices? My application not appears in the device setting at the Samsung Health Settings -> connected services (where my fitness apps are - that apps also using the samsung health data too).

janosdupai commented 4 years ago

D/FitKit (21469): readSample: heart_rate I/flutter (21469): [] D/FitKit (21469): readSample: step_count I/flutter (21469): [] D/FitKit (21469): readSample: height I/flutter (21469): [] D/FitKit (21469): readSample: weight I/flutter (21469): [] D/FitKit (21469): readSample: distance I/flutter (21469): [] D/FitKit (21469): readSample: energy I/flutter (21469): [] D/FitKit (21469): readSample: water I/flutter (21469): [] D/FitKit (21469): readSample: sleep I/flutter (21469): []

krokyze commented 4 years ago

Hey @janosdupai Android is integrated with Google Fit, as far as I know they don't have any connection between them. Can you please try to sync your Samsung Health Data with Google Fit?

janosdupai commented 4 years ago

Thank you! That was the reason. Now works perfectly!