-
Notifications
You must be signed in to change notification settings - Fork 73
Android 10 - ACTIVITY_RECOGNITION #60
Comments
I am also facing this issue after changing the targetSdkVersion and compileSdkVersion to 29 and I think this is something to do with new privacy changes in the new Android 10. More info on the below link. https://developer.android.com/about/versions/10/privacy/changes#physical-activity-recognition I was able to solve this by manually asking the permission for ACTIVITY_RECOGNITION using permission handler package and also added below line to AndroidManifest.xml file
Is there any way the fitkit package can handle this? |
Hi! I using this package, for manually asking the permission. |
Hi! Code how you can request access to activity on 10 android.
|
@Feduch I think that it's really not obvious that this snippet is required for FitKit to work on Android phones! Why isn't this logic part of At very least it should be explicitly documented in the README that such snippet is required, or even included in the example code! |
@Feduch @cubuspl42 you're always welcome to make a PR with changes. |
Hi!
On Android 10 getting PlatformException
I/flutter (11492): PlatformException(FitKit, 10: SecurityException: com.google.step_count.delta requires android.permission.ACTIVITY_RECOGNITION, null) I/flutter (11492): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569) I/flutter (11492): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:156) I/flutter (11492): <asynchronous suspension> I/flutter (11492): #2 MethodChannel.invokeListMethod (package:flutter/src/services/platform_channel.dart:342) I/flutter (11492): <asynchronous suspension> I/flutter (11492): #3 FitKit.read.<anonymous closure> (package:fit_kit/src/fit_kit.dart:0) I/flutter (11492): <asynchronous suspension>
How to fix it?
The text was updated successfully, but these errors were encountered: