Open rashmitank opened 3 years ago
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.
private fun requestAuthorization(call: MethodCall, result: Result) {
if (activity == null) {
result.success(false)
return
}
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
Hello guys! I am also having issues. The dialog screen doesnt show and i get no permitions. I didn't set anywhere the OAuth2 Client ID. This was quite strange. I have a flutter firebase google sign in and i am assuming that since i am using the same fingerprint and credentials. things might work!
Version 3.0.4 doesnt provide sourceName property from the HealthDataPoint model, and i need it to filter steps added manually on iOS!
@bardram, Do we need to set up the generated Client OAth ID somewhere in the application ?? It isn't mentioned in the docs anywhere.
I also have the same problem
give me please full example for installation on android i mean I'm not correctly understand how need to setup this package
Update:
I didn't change anything but it worked
We can use v3.0.4 as workaround.
Uh oh, it doesn't support null safety for newer versions of flutter
We can use v3.0.4 as workaround.
Uh oh, it doesn't support null safety for newer versions of flutter
Run the app with --no-sound-null-safety
argument for newer version of flutter
We can use v3.0.4 as workaround.
Uh oh, it doesn't support null safety for newer versions of flutter
Run the app with
--no-sound-null-safety
argument for newer version of flutter
Worked as a charm. Had an issue involving 2.0.9 consts but 'flutter clean' did the trick. Thank you so much!
Quick update: authorization works using v3.0.4 but this is also a thing: https://github.com/cph-cachet/flutter-plugins/issues/354#issue-906882903
Though for some reason, I did manage to retrieve steps. Heart rate, on the other hand, returns empty.
same issue 3.0.4 as well
Hi @Cheddargt, after debugging v3.0.4, I found the following working for me, try doing this with health v3.0.4:
1) add this permission to the android manifest file:
<uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
2) Now in your dart code, before the code for fetching the google fit data, check for this permission with the help of "permission_handler" plugin by doing this "await Permission.activityRecognition.request().isGranted". Make sure that this permission is granted by the user on the screen and then proceed with the code for fetching the User Activity Data.
Hope this helps for now.
Hello guys @rohitranjan1991 @Cheddargt after debugging v3.0.4, It's working for me with no errors the issue is I am not getting any data
List<HealthDataPoint> healthData = await health.getHealthDataFromTypes(startDate, endDate, types);
list is always returning empty and step count is 0.Please help !!
@hasan-abul , the latest version of the library solved it for me.
@hasan-abul , the latest version of the library solved it for me.
The latest version is : 3.1.1+1 Are you really active, I can't get a popup asking to access Google Fit
I'm facing the same issue.
https://github.com/cph-cachet/flutter-plugins/issues/348#issuecomment-908512234
AccessDenied! was printed. What should I do?
@hasan-abul , the latest version of the library solved it for me.
@rohitranjan1991 Are you sure? I still appeared. https://github.com/cph-cachet/flutter-plugins/issues/336#issuecomment-908591998
I found solution.
We need to make project public in GCP (Test or Production).
https://console.cloud.google.com/apis/credentials/consent
And need to add user in Test User
.
I found solution. We need to make project public in GCP (Test or Production). https://console.cloud.google.com/apis/credentials/consent And need to add user in
Test User
.
for me it's only working in test mode. when I set the project to production mode, it stops working. do you have a solution for this?
@riobijanero ,, Did you go thru the full verification process after putting the app in production mode ?
I spent 2 months to finally verify my app with Google Oauth. It's mostly working fine now but yet, some users are reporting they stuck in tis white loading screen.
I am working with Google Fit since 4 apps now. If your are stuck with endless loading screen try to flutter run --release on real android device.
in Google Cloud you also have to add your --release SHA generated, in order to make it work with your real device. And when you publish the app in order to allow your end users to access to google fit since they download it from the play store, you need to go on the web app publish ("google store console app publish" on google web) and recover the google SHA and add it to google cloud SHAs
Does anyone know where we can store our OAuth client id .json file to our project and still i am having the access denied issue does anyone got any solution till now?
getting Authorization not granted in your example project. I have properly set an OAuth2 Client ID.