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 72 forks source link

Missing Fitness Access popup #54

Closed troyzonzon closed 4 years ago

troyzonzon commented 4 years ago

Hi I have used your widget in other apps, but this particular app using the newest widget is not popping up the authorization screen, I am only seeing the account selection.

krokyze commented 4 years ago

Hey @troyzonzon could you be more specific. Android or iOS? Which version?

ltonn02 commented 4 years ago

Hi, I have the same problem with my app. I'm using the Android version. Every time I start the app the account selector pops up, when I click on my account nothing happens. When I try to read data using this:

final results = await FitKit.read( DataType.DISTANCE, dateFrom: DateTime.now().subtract(Duration(days: 5)), dateTo: DateTime.now(), );

I get this error: PlatformException (PlatformException(FitKit, User denied permission access, null))

krokyze commented 4 years ago

@ltonn02 can you please verify this: https://github.com/krokyze/FitKit/issues/45#issuecomment-643667079

ltonn02 commented 4 years ago

@krokyze thanks for your advice, I think I fixed the issue. You need to add the release SHA-1 to the debug configuration as well. My build.gradle now looks like this:

signingconfig

buildtypes