flutter-plugins
flutter-plugins copied to clipboard
health: 3.0.5
getting Authorization not granted in your example project. I have properly set an OAuth2 Client ID.
I'm facing same problem on my apps..
I also have the same problem. HELP!!
I've been having the same problem, the plugin doesnt ask the permission for GOOGLE_FIT_PERMISSIONS_REQUEST_CODE but directly print "Authorization not granted".
The same issue.
Me too. I also have the same issue.
same here, need to be fixed asap
I have same issue please resolve it
I've debugged the health plugin. This is my first try to debug the flutter package. So, it won't be enough investigation. But I want share what I know and I did following.
- The cause of problem seems to be that "activity" is null.
private fun requestAuthorization(call: MethodCall, result: Result) {
if (activity == null) {
result.success(false)
return
}
- The "activity" variable should be initialized by "onAttachedToActivity". "onAttachedToActivity" is called after "onAttachedToFlutterEngine", according to this article.
- Unfortunately, I cloud not catch process on "onAttachedToActivity" and "onAttachedToFlutterEngine" by debug mode somehow...
override fun onAttachedToActivity(binding: ActivityPluginBinding) {
if (channel == null) {
return
}
binding.addActivityResultListener(this)
activity = binding.activity
}
I need to get the step count from google fit to my application when I tried the example it shows that Authorization not granted
[ /// You MUST request access to the data types before reading them bool accessWasGranted = await health.requestAuthorization(types); ] this bool value sets false
I tried to get the activity recognition permission by activity_recognition_flutter: ^4.0.0
In the app info it shows the permission was granted but still facing the same issue
I cannot find where the problem occurs if any contributors know something about it or any other procedure missed please instruct us and help us to use this feature
Hi,
What is "activity"? This variable is always null, therefore the following condition is always true:
oraz
We can use v3.0.4 as workaround.
I also have the same issue.
We can use v3.0.4 as workaround.
can you explain it more how we can get around issue
getting Authorization not granted in your example project. I have properly set an OAuth2 Client ID.
Did you get any solution?
We can use v3.0.4 as workaround.
can you explain it more how we can get around issue
sorry for my rough comment. what I mean we can use the health v.3.0.4 temporarily until this issue is fixed.
<pubspec.yaml>
health: 3.0.4
Another alternative is to use the #338 branch, before it is merged.
<pubspec.yaml>
health:
git:
url: https://github.com/traveling-developer/flutter-plugins.git
path: packages/health
ref: health-3.0.3+1
@patrickkusebauch it;'s not working. ?When tap on download button the google sign-in dialog open and then click on account it return with same error "Authorization not granted"
@himanshu447 Just the fact that the google sign-in dialog will open means it is working. The follow-up error you are having seems unrelated to the original issue. You might have forgotten to actually set up the proper permissions. The setup I have described is working for me on an emulator as well as on an actual android device. Admittedly I have not tested it on an iOS device.
Hello @patrickkusebauch Google sign-in popup open for me as well, but after choosing account it return error "Authorization not granted", handleWindowVisibility: no activity .... I guess this is reason for auth fail. isn't it?
getting Authorization not granted in your example project. I have properly set an OAuth2 Client ID.
I am having same issue. But where did you set the OAuth2 Client ID? I don't receive any Google Sign-In dialog. It goes straight to "Authorization not granted"
Hello @waikyaw9999 https://github.com/cph-cachet/flutter-plugins/issues/336#issuecomment-841665698 . But where did you set the OAuth2 Client ID? I also want to know
Hello @waikyaw9999 #336 (comment) . But where did you set the OAuth2 Client ID? I also want to know
@sandeep9607 I followed your instruction. Now it showed me Google Sign-In Dialog but after I clicked on my google account. I am now stuck at the permission dialog box (I don't see anything but the google loading circle). I didn't set anywhere the OAuth2 Client ID.
@himanshu447 Just the fact that the google sign-in dialog will open means it is working. The follow-up error you are having seems unrelated to the original issue. You might have forgotten to actually set up the proper permissions. The setup I have described is working for me on an emulator as well as on an actual android device. Admittedly I have not tested it on an iOS device.
Do you have any example about setting up the proper permission. I am having the same issue.
@himanshu447 Just the fact that the google sign-in dialog will open means it is working. The follow-up error you are having seems unrelated to the original issue. You might have forgotten to actually set up the proper permissions. The setup I have described is working for me on an emulator as well as on an actual android device. Admittedly I have not tested it on an iOS device.
Do you have any example about setting up the proper permission. I am having the same issue.
Hi, it is working now. I set the wrong package name. #336 (comment) is working. When is it going to be in the release? I should mention that version 3.0.6 is still not working though. [Updated] This doesn't work on production as getting conflict with other packages.
I have the same Problem. None of the solutions are working for me
I have the same Problem. None of the solutions are working for me
https://github.com/cph-cachet/flutter-plugins/issues/336#issuecomment-839795664 This works for me.
I have the same Problem. None of the solutions are working for me
https://github.com/cph-cachet/flutter-plugins/issues/336#issuecomment-839795664 This works for me.
hey @waikyaw9999 , thanks for the reply. however the link leads to an empty github page
Oh. you can use health:3.0.4 > > > I have the same Problem. None of the solutions are working for me
https://github.com/cph-cachet/flutter-plugins/issues/336#issuecomment-839795664 This works for me.
hey @waikyaw9999 , thanks for the reply. however the link leads to an empty github page
@waikyaw9999 @takinok which flutter version you guys working with?
@waikyaw9999 @takinok which flutter version you guys working with?
Follwing is my version.
Flutter 2.0.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision adc687823a (7 weeks ago) • 2021-04-16 09:40:20 -0700
Engine • revision b09f014e96
Tools • Dart 2.12.3