I´ve got a problem with the Nearby Messages API. Following scenario:
When I test my App with Android Studio everything is working fine, Messages are sent and get received.
When I build an APK and install the generated (and signed) APK on the phone, Nearby Messages doesn´t work anymore. It won´t find any messages...
Does anyone had a similar problem or knows a solution (better knows the reason WHY it´s not working)?
UDPATE
In the side bar of Android bar , you will have the tab "build variants" , change the option from debug to release and then run the signing report , you will get the release sha -1 key.
When you sign apk for release with a Keystore, the SHA-1 fingerprint will be different than the debug version. This prevents the Google apis from working.
Use this in CMD to find out SHA-1 of release apk
keytool -list -v -keystore mystore.keystore
Related
I've built the App on android studio. When I connect my phone to my PC and build it directly through Android Studio it works. I get the phone verification code and am able to sign in. But when I generate a signed APK to distribute it to others, it always says "Verification Failed" and doesn't let me sign in.
I'm pretty sure there's no problem with the code, because it works perfectly when I build it through Android Studio directly onto my phone.
What Ive Tried:-
I followed the steps in this link and changed the SHA-1 code in my firebase console to the one provided in my Google Console, it still says verification failed.
I also tried to keep only one SHA-1 key in my firebase console which is the one i found in my android project, updated the google-services.json file and tried generating a signed APK, its still says verification failed.
Generate a new SHA1 fingerprint from the console in Android Studio using
keytool -list -v -keystore <absolute path of Keys generated during signed APK generation> -alias <app alias name>
Paste the generated fingerprint in the firebase console and delete the older one.
Hope this works!
I am working on an app that uses firebase phone authentication (authUI) to sign in users. I have integrated firebase successfully in multiple apps before without any error. For this app I get the error on. This is very annoying since the app does not produce the same error on debug. I noticed the error when I uploaded the apk to playstore and my users started complaining. I have double checked everything. I even used the firebase plugin to import firebase to the project. Everything on google-services.json is okay even SHA1 matches. Anybody experienced the same and maybe anyone who know how to solve it?? Frustrating
You need to add Release Keystore SHA1 to your Firebase project just as you did add Debug SHA1
You can obtain the key
keytool -list -v -keystore [release_key_path_here]
Copy the certificate fingerprint SHA1
Follow detail steps here
I released a Signed APK as mentioned in this link
When I run the project from eclipse as an Android project, Everything is going fine.
but when i use the signed APK it is not returning any data, also G+ login is not working.
It shows the following person information is null
What can be the reason for this behavior?
Why app is running properly when I run it as an eclipse project and not working when I use the APK.
I am generating release key using the following code:
keytool -exportcert -alias "knowledgeup_alias" -keystore "D:\keystore\androidfinal.jks" | "C:\Users\abc\Downloads\openssl-0.9.8e_WIN32\bin\openssl.exe" sha1 -binary | "C:\Users\abc\Downloads\openssl-0.9.8e_WIN32\bin\openssl.exe" base64
it is working when ever I run it from eclipse. but it doesn't when ever i use the APK
Ideas!
I am not sure perhaps your facing the issue same i faced while done
LinkedIn integration.my app work like a charm while running it on
debugging mode but when trying with the signed APK it won't.And i
realized that the problem arising while happen the mismatching of our
release key with their key that getting at the app registration
process.
And the link Android LinkedIn mobile SDK error? helped me lot.
Give a look.It couldn't be an answer hope that will be a lead.
I develop locally with android-studio and a Galaxy S3 android phone connected via USB.
On my local development environment, when I fire up the run configuration to deploy on the S3, everything works fine - the map shows up just fine.
But when I deploy as signed APK to our server, and install via Internet (I am trying on another android phone to keep things clearly separated), the map tiles don't load, I see the Google sign to the lower left and the GPS location icon on the upper right corner.
I've seen a few related posts:
Android Google Maps application showing grey background instead of the map
which seems first a bit dated, second he uses eclipse (I am using android-studio), third - it didn't work for me.
Android - Google Maps Grey Screen on Signed APK
This guy didn't get any useful answers to his question....
The first step is to get the SHA1 value for the key that you used to sign the release version of your app using the keytool command line tool.
keytool -list -v -keystore ~/Keystore/key1.jks -storepass <your_store_password> -keypass <your_key_password>
Replace ~/Keystore/key1.jks with the path and name of the keystore that you used to sign your release version, and replace the passwords with your own.
When you execute this command at the command line, it will list the Certificate Fingerprints, including the SHA1 value that you need.
The next step is to add the SHA1 and package name to a key in the Google Developers Console.
You can either add it to the same key you used for debug builds, or you can create a new key.
To add your release SHA1 and package name to an existing API key, click the Add package name and fingerprint button, and add your SHA1 value and package name.
Then, you can use this API key with the signed release version of your app.
For more information on how to configure your app if you use a different API key for debug and release, see here.
Step 1: Follow the instructions from here:
http://developer.xamarin.com/guides/android/platform_features/maps_and_location/maps/obtaining_a_google_maps_api_key/
Step 2: Then from your Android Studio, follow the steps described here:
https://www.udacity.com/wiki/ud853/course_resources/creating-a-signed-apk
I faced a similar problem and had it solved by doing the above.
All,
I have been banging my head over this one for a few weeks now. I got google maps v2 setup for debug following all of their directions. I got my debug key based on the debug.keystore and everything worked great.
I was then releasing my application to the Google Play Store and followed the instructions on how to generate my release key and I generated my Google API Key using the Sha1 of the release key as the instructions state.
I released my application to the store and everything works great. Here is the problem though, I can no longer get the maps to show up even when switching back to the debug API key.
Currently to debug I have been releasing a build to Beta, waiting 3 hours, and then fixing accordingly. Luckily my map work has stabilized on this application but I would still like to understand what is going on.
Any ideas anyone?
I suggest that before you release to actually build apk in production mode then do adb install to your device. I try it and see if it works. At least it guarantee working before putting it up
Make sure that the map key id you use in the manifest is for release mode not debug mode.
Just before exporting the app as apk, replace the Google Maps debug key with release key. It worked for me.
Debug certificate: The Android SDK tools generate this certificate automatically when you do a "debug" build from the command line, or when you build and run a project from Eclipse without exporting it as a released application. The certificate is only for use with an application that you're testing; you can't publish an app that's signed with a debug certificate. The debug certificate is described in more detail in the section Signing in Debug Mode in the Android Developer Documentation. You can generate an API key from this certificate, but only use the key for testing, never for production.
Release certificate: The Android SDK tools generate this certificate when you do a "release" build with either ant program or Eclipse. You can also generate this certificate using the keytool program. This certificate can be used with an app you release to the world. Once you have the correct certificate for your needs, you can display its SHA-1 fingerprint using the keytool program.
More here: Google Maps Android API v2