Health Kit: Unable to complete Login and Authorization via Huawei ID - huawei-mobile-services

I use Huawei Health Kit in my Android app for data access in Huawei Health app. After launching the app on my Huawei HMS phone, I tap the “Login and Authorization” (see the screenshot below). It does not do anything. In other words, it seems that the app is unable to complete the process of login and authorization. Note that I do have a Huawei ID in the phone, and have Health Kit service approved for my app from link.
Can someone help?

It seems that you have not imported the signing certificate to the app. There are several ways to resolve the issue. The simple way is to add the following code into the build.gradle file of the app:
signingConfigs {
debug {
storeFile file('xxx.jks')
storePassword 'xxx '
keyAlias = 'xxx'
keyPassword 'xxx'
Hope this helps. You can find additional info in Link

Related

Implementing google login flutter gives 12500 error

I implemented google login in flutter without using firebase in flutter (google cloud console). It was working in apk then later I needed push notification service for which I used firebase (fcm token and all) then I released the app to playstore but google login does not work. I keep getting apiexception error. Has anybody faced this issue? if yes any help would be highly appreciated.
I do not have a specific answer to your problem but I have also faced this problem once, I accidentally resolved it though.
But Error 12500 is a general error code that may occur when attempting to use the Google Sign-In feature and is caused by a few potensial issues:
An issue with the SHA-1 fingerprint of your app's signing
certificate: To use Google Sign-In, you need to configure your app's
SHA-1 fingerprint and package name in the Firebase console. Make
sure that the fingerprint and package name you have configured in
the Firebase console match the ones you are using to sign your app.
An issue with the Google Services configuration file: Make sure you
have properly added the Google Services configuration file to your
app.
An issue with the Google Play Services library: Make sure you have
the latest version of the Google Play Services library installed in
your app.
An issue with the device or emulator you are using: Make sure you
are testing on a device or emulator that has Google Play Services
installed and is up to date.
Possible fixes to try/check:
Double-check the SHA-1 fingerprint and package name: Make sure that
the SHA-1 fingerprint and package name you have configured in the
Firebase console match the ones you are using to sign your app.
Make sure you have added the Google Services configuration file: The
Google Services configuration file is required for your app to
communicate with Google services, including Google Sign-In. Make
sure you have properly added this file to your app.
Update the Google Play Services library: Make sure you have the
latest version of the Google Play Services library installed in your
app. You can check for updates by going to the "SDK Manager" in
Android Studio.
Test on a device or emulator with Google Play Services installed:
Make sure you are testing on a device or emulator that has Google
Play Services installed and is up to date.
I hope this helps! I will quickly search if I can find any other solution.

Firebase phone authentication: how to enable "Android Device Verification" API

currently I'm facing a problem about firebase phone authentication.
Whenever I searched the problem in SO, everybody said that "Android Device Verification" API shall be enabled, but the API is not searched on GCP.
You can find the Android Device Verification service here.
Ensure you have enabled Android Device Check API and you have added your SHA256 to the Firebase Console.

Flutter: SafetyNet Attestation fails basic integrity

When trying to run Firebase Phone Authentication through a Virtual Android Device am getting the following error messages;
E/zzbf ( 6464): SafetyNet Attestation fails basic integrity.
I/zzmt ( 6464): Provider GmsCore_OpenSSL not available
W/System ( 6464): Ignoring header X-Firebase-Locale because its value was null.
Android Device Verification for the project is enabled through
Google Cloud Console; https://i.imgur.com/e1XWrWS.png
SHA-1 & SHA-256 is added to Firebase Project Settings; https://i.imgur.com/0PLnkzm.png
App level build.gradle has implementation "androidx.browser:browser:1.4.0" & implementation 'com.google.android.gms:play-services-safetynet:18.0.1; https://i.imgur.com/RPHS4Y1.png
I have investigated similar StackOverflow topics and tried the possible solutions but no luck. Running on a physical Android Device it runs fine but in Virtual Device I can't get past captcha verification.
Also when checking the SafetyNet documentation I saw that it's deprecated and it will be replaced by Play Integrity API.
Google Play Integrity API is enabled through Google Cloud Console; https://i.imgur.com/WctB3i8.png
App level build.gradle has implementation 'com.google.firebase:firebase-appcheck-playintegrity'; https://i.imgur.com/qr1LiZ4.png
Nothing I have mentioned helped me fix the error messages, any suggestions ?
UPDATE 1::
Found this place and added Firebase App Check dependency to my app, but does it actually have anything to do with it as my issue is still going on?
You can try with this, might help,
Make sure to re-download the google-services.json whenever you change the SHA keys in the Firebase console.
Check if the android emulator (ADB) target supports Google Services

PERMISSION DENIED when using Firebase AppCheck in emulator suite

I'm implementing AppCheck in my app in order to prevent bad access to Firestore. I activated the service in Firebase Console and add this line await FirebaseAppCheck.instance.activate(); after Firebase initialization.
Now, if I try to access Firestore in my app through emulator it logs PERMISSION DENIED.
How could I develop updates for my app and continue testing while AppCheck is enabled?
After you have registered your app for App Check, your app normally won't run in an emulator or from a continuous integration (CI) environment, since those environments don't qualify as valid devices. If you want to run your app in such an environment during development and testing, you can create a debug build of your app that uses the App Check debug provider instead of a real attestation provider.
Refer documentation Flutter app Check details.
However, as per the documentation, the debug provider does not currently have a Dart API; you'll need to apply the changes separately for each of your platforms.
You may check the App Check debug provider available for other platforms like Apple, Web and Android.

An error is reported when HUAWEI Drive Kit is used to query the file list

I want to use the HUAWEI Drive service in my app. My app has integrated HUAWEI Drive Kit 4.0.3.300. When my app calls the Drive.Files.Create(File content) API to upload a file, the upload failed, and error code 403 is reported in the log.
I checked the HUAWEI ID sign-in code and found that the Drive scope is correctly set, and the Android Studio version is 3.6.3.
The error information in the log is as follows:
{"error":{"code":403,"description":"Not sign agreement, please confirm","errorDetail":[{"reason":"AGREEMENT_NOT_SIGNED","domain":"global","errorCode":"21004033","description":"Not sign agreement, please confirm"}]}}
The error information indicates that you have not signed HUAWEI Drive Kit user agreement. Please visit https://cloud.huawei.com/ to sign this agreement.
Please refer to the following document for more error code information:
https://developer.huawei.com/consumer/en/doc/development/HMS-References/drivekit-devreference