Comments (12)
Hello everyone. I am able to identify the issue. Actually, in debug/release mode, Iβm able to get the authorization and data from debug/release app google fit device but just when I publish it to the google play console for internal testing that time it won't work. so the reason is app is unreviewed. so Google uses its own signing key for that app. so whatever you added SHA key is removed. so the solution is=> go to internal testing=> app release version details and download the apk file. => go to file location=> hit the command keytool -printcert -jarfile 14.apk and copy the SHA key and replace it to OAuth 2.0 Client IDs credentials SHA key. remember whenever the app publish as beta /production remove the SHA key and use your own release SHA key.
Thank you π
from react-native-google-fit.
Did you figure this out? We're running into the same exact issue. I installed both the release and debug(apk) version on my phone using adb and they seem to work, but if I upload the .aab to google play store, the authentication fails for some reason.
from react-native-google-fit.
@ThibautMT yes
from react-native-google-fit.
Solved: I had two keys google play store and I had only added one of them. For some reason, someone added a new key and it was not being used but after added the key which was marked "old", I had no issues in the play store version
from react-native-google-fit.
Solved: I had two keys google play store and I had only added one of them. For some reason, someone added a new key and it was not being used but after added the key which was marked "old", I had no issues in the play store version
@samutoljamo can you explain in more detail? which key did you change? I am also facing the same issue.
from react-native-google-fit.
Hi! By "key" I meant the SHA-1 signature of your app. Locally, we have two different keystores which produce a different signature(debug,release). Google play store also automatically signs your application for you. You can see the SHA-1 signature of your google play app in the portal where you upload your app to google play. I got confused because we had two SHA-1 signatures in google play and the other one was same as our release version but after adding the other SHA-1 from google play, we haven't had any issues
from react-native-google-fit.
@samutoljamo I added both debug and release SHA-1 key it won't impact the app but when publishing on the play store without review it wonβt work.
BTW thanks for your time and reply
from react-native-google-fit.
Hello everyone. I am able to identify the issue. Actually, in debug/release mode, Iβm able to get the authorization and data from debug/release app google fit device but just when I publish it to the google play console for internal testing that time it won't work. so the reason is app is unreviewed. so Google uses its own signing key for that app. so whatever you added SHA key is removed. so the solution is=> go to internal testing=> app release version details and download the apk file. => go to file location=> hit the command keytool -printcert -jarfile 14.apk and copy the SHA key and replace it to OAuth 2.0 Client IDs credentials SHA key. remember whenever the app publish as beta /production remove the SHA key and use your own release SHA key.
Thank you π
Amazing, it working by adding the SHA1 from the internal test apk.
Did you manage to get approved for Google Fit ?
from react-native-google-fit.
So work around is we need to create the APK n upload to the google play console ? or do we have any solution for making the aab work with google fit ?
from react-native-google-fit.
So work around is we need to create the APK n upload to the google play console ? or do we have any solution for making the aab work with google fit ?
To make the AAB work with Google Fit, follow these steps:
-
If you are not using Google App Signing, it's crucial to ensure you are signing the AAB with the correct keystore.
-
If you are using Google's App Signing, when you upload the AAB, it will be signed by Google's keystore when users download it.
-
Go to your Google Play Console and select your app.
-
Navigate to App Signing in the console.
-
Find your signature details generated by Google Play.
-
Copy the SHA1 key.
-
Go to the Google Console, select the Fitness API, and update the SHA1 key with the one you copied.
This ensures that the AAB works seamlessly with Google Fit.
from react-native-google-fit.
Hi!
I've encountered the same issue and applied the steps above.
I generated a signed release apk to test the Google Fit functionality and it is working as expected.
Then I created a signed aab and uploaded it to playstore for publishing.
I also created a new Oauth 2.0 Client ID for the same package name with the SHA-1 from playstore
Then I tested the playstore app's Google fit function,
It did not work.
Is there something amiss to what I just did ?
from react-native-google-fit.
@dhruvpvx
on step 7, did you just overwrite the SHA1 Key (which i presume was for the release apk/aab build) directly?
or have you added another Oauth 2 Client ID with the same package name ?
currently i tried both ways but nothing's working for me
from react-native-google-fit.
Related Issues (20)
- isAvailable() doesn't work on Android 11+ without change to AndroidManifest.xml HOT 1
- getDailySteps returns empty array HOT 3
- passing callback to `observeSteps` causes crash HOT 6
- Running the react-native google fit with background fetch crashes the app HOT 1
- Data for users who never used Google Fit HOT 3
- Authorize Issue in bundle release HOT 6
- GoogleFit.getXXXSamples(options) returns with no data HOT 1
- Using new GoogleSignInClient
- I want to retrieve information about connected users.
- How to get Read Sleep Data by sessions of type sleep as Document HOT 4
- GoogleFit.disconnect() not working
- App crash on bundleRelease - java.lang.IllegalStateException
- How to allow access to our react native mobile app without mandatory Google OAuth sign in blocking users progressing (is it possible to easily skip)? HOT 3
- Firebase Error: Attempt to invoke virtual method 'java.lang.String java.lang.String.to LowerCase()'on a null object reference HOT 1
- Missing source information for some datatypes
- Google Fit Sync working in prod apk but not in Playstore build (With firebase) HOT 1
- Could not find method compile() for arguments
- Distance missing from Save workout HOT 1
- How could I get the steps data from Headless?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-google-fit.