cph-cachet / flutter-plugins

A collection of Flutter plugins developed by CACHET
527 stars 625 forks source link

[health 9.0.0] requestAuthorization method never returns on Android #897

Open bardram opened 4 months ago

bardram commented 4 months ago

Device / Emulator and OS

When calling the requestAuthorization() method on Android, the method never returns. So if awaiting this then the execution stops.

Using Health Connect.

Kam5678 commented 4 months ago

https://github.com/cph-cachet/flutter-plugins/issues/847

I had to revert back to health 8.0.0 to get it working for android again.

hagen00 commented 4 months ago

Have you tried this: https://github.com/cph-cachet/flutter-plugins/issues/888#issuecomment-1931983263

That worked for me. Specifically updating MainActivity.kt as follows:

package xx.xx.xxxx --> your package

import android.os.Bundle
import io.flutter.embedding.android.FlutterFragmentActivity

class MainActivity: FlutterFragmentActivity() {
}
Kam5678 commented 4 months ago

Hey Hagan, thank you for replying. I was actually able to get it working with your help, so thank you!