Google Sheet API is Not Working in Release Build - android

Am using Google Sheet API in my Android App. It's working fine as expected in debug mode. Stopped working when I published it in the play store. Now App is getting crashed due to it. Users seem unhappy now!

Make sure that you update the SHA-1 with the release SHA-1 in the Key restriction section at the Google developer console.
Steps:
Open the Google Console.
Select your project.
Select credentials.
Select your key.
You see the picture below explaining where to edit the SHA-1.
You can get the "Release certificate fingerprint" from the following command.
keytool -list -v -keystore your_keystore_name -alias your_alias_name

Related

Which SHA-1 key should be used when releasing a Xamarin app with a Google login to the Google play store?

I am releasing my app on the play store using an SHA-1 key to make it able for the user to login via Google provided by Firebase. The key I am using right now is generated by the keytool.exe program using the following command.
keytool.exe -list -v -keystore "LocalAppData%\Xamarin\Mono for Android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
When using the SHA-1 key generated by the keytool.exe the app works fine on the visual studio emulator and a smartphone connected via usb in both debug and release compile mode.
When the app is published on the google play store using this SHA-1 key the google login does not work anymore.
Which SHA-1 key should be used in this case?
If you have google managing your app signing key (default option now I believe). You will need to use the SHA provided by the PlayConsole for the released version.
Log into your play console
Select the relevant App From the Menu
select Release-->Setup-->App integrity
You want to use the App signing key certificate.

google map blank only at release (didn't work every comment on stackoverflow)

I've got blank screen only at release version.
(debug is fine.)
I've tried most of answer in stackoverflow... but it didn't works....
Please check below images.
I've put the key on debug & release xml and also make them list on console.developers.google.com.
What kind of things I can do more??
(And this is basic project what Android studio support which I can choose when I made new project at Android studio.)
enter image description hereenter image description here
First check on your Google Map Console's account whether your API is restricted or public.
if it is restricted for android then you have to provide package name with SHA1.
you can generate your SHA1 from command prompt
keytool -export -alias YourAliasName -keystore "your_jsk_path" -list -v
and also after deploying on playstore you have to add that SHA1.
you can get that SHA1 from Release Management > App Signing >App Signing Certificate.

Google Sign in not working from app downloaded from playstore

Created an app which uses react-native-google-signin to login to the app with google login
Created a keystore for to sign my app, as is described here
Signed my app and uploaded into Google Playstore
When I was asked if I want to opt-in for the Google Play App Signing, I agreed
If I try to login to my app (downloaded from the playstore), I'm getting an error messsage: DEVELOPER_ERROR, error code: 10
Note1: my app does not use firebase
Note2: if I install the apk directly into my device, the login seems to work
I'm sure the problem has something to do with how the application is signed with Google Play App Signing but I'm not able to isolate the issue
Update:
Downloaded the google-services.json from here and added it under /android/app and now the app works if I download it from the release management page and install it manually. Still doesn't work if I install it directly from the Google Play Store though.
It is very simple, Go to play store account where you uploaded your signed APK. select your App, then go to the Release Management section then App signing.
Copy the SHA1 key of App Signing certificate.
Go to this link https://developers.google.com/identity/sign-in/android/start-integrating
Click on CONFIGURE A PROJECT button
select your App, select Android, App your app package name, then paste the SHA1 certificate
Then click Create. Thats it.
Now you can use google signin in your App
Solution:
The problem was that while generating the google-services.json, the App signing certificate SHA-1 certificate fingerprint needs to be provided; I was providing the Upload certificate's SHA-1 certificate fingerprint which is why it wouldn't work on production.
In essence, in the credentials page, you'll need to create a two oauth client ids for Android (one with the App Signing certificate and one with the Upload certificate and one oauth client id of type web and in while using react-native-google-signin you need to specify the webClientId.
You added sha-1 key for your app in debug mode and at that time you will be able to do google sign in your app.
But as the app goes in production, it requires sha-1 key for production.
And that you need to add at firebase console.
You can check your firebase console and check for android app.
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
The above commad helps to create sha-1 key for debug version.
You meed to provide you signed key-store file path for production sha-1.
And this will be done with command
keytool -exportcert -list -v \-alias <your-key-name> -keystore <path-to-production-keystore>
You just need to provide specific paths for keystore file for released apk.
Yesterday same problem occurred to me.
Google has released a new signing service in playstore publish console in which google will signin your app with his keystore. After signing , it will give you a new SHA which you have to add in your fireenter image description herebase account. See the image for the better understanding

After signed apk google plus login not working in Android? Is there any proguard option?

Before signing APK, Google Login was working fine.
After signing APK, it's not working, always failure.
For that, are there any proguard settings that I have to do?
My SHA1 and all credentials are fine but still not working how to solve?
Go to the Google live play store account.
Select your app.
Select App signing tab in left side
Copy both App signing certificate and Upload certificate's SHA 1 key.
Then go to google Api console or firebase developer console --> then select your project.
FireBase:
1.Project over view --> project settings(setting icon right side)
2.Click on the Project settings then add your fingerPrint(SHA 1 Key which you had copied from Google live play store account).
Google Api Developer Console:
Select your project. Click credentials tab on left side bar. Then select your api Key then click edit icon right side. Then add your SHA1 key.
That's all.
Finally i was created new key based on release SHA1, now google login and maps working fine after signed apk , no need to run keytool commands, in android studio takes care of everything. you have to follow steps that it.
Android Studio2.1.1
File->Project Structure->app(Left hand side)
->Signing(on top side)->(Click on green color + button and add your release keystore details)
->Build Types(next to the signing tap) and select release on left hand side then right hand side you will see the some fileds in that choose signing config to release then click ok.
Finally click Gradle tap right hand side, then
Project name->project name->Tasks->android->singingReport(click on that)
now your debug key and Release key was ready On RUN console check it
That might be because you've added SHA1 of only debug keystore.
Add another SHA1 of production keystore and it will start working. If you're using Linux of Mac OS, generate SHA1 like this.
keytool -list -v -keystore YOUR_PRODUCTION_KEYSTORE_PATH -alias androidproductionkey -storepass password -keypass password
For windows following should work.
keytool -list -v -keystore "YOUR_PRODUCTION_KEYSTORE_PATH" -alias androidproductionkey -storepass password -keypass password
It is better that you add one more OAuth key in the API Console, so that you end up having two OAuth ids, one with debug key SHA1 fingerprint and other with the release key SHA1.
This way, both your debug and release APK files will continue to work.
Just in case anyone made the same mistake as me regarding signing with incorrect keystore/file/password in the APK generator/wizard, see my answer at https://stackoverflow.com/a/45631945/1145905

google maps doesn't appear ? android

I've create key for android application , and set the debug sha1 from key store debug which android studio should use.
I extract the sha1 using this command :
keytool -list -v -keystore debug.keystore -alias androiddebugkey -storepass android -keypass android
I double check that I set correctly the key and the package name at the google developer. and also delete the key and generate another one, but that doesn't help, google maps deosn't appear.
please notice that my production app work perfect.
What may be the problem ?
EDIT:
logcat show this:
Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).
SOLVED:
I forget to enable the map api at the google project console, the log cat doesn't doesn't show this problem.
When I had this issue, it was because the package name I entered in the developer console to get the key was different from the package name of my application. Please ensure that they are the same

Categories

Resources