I am facing a problem of my android app(online streaming app). I had to make an app in which performs online video streaming. It has firebase phone number authentication. my problem is that the debug app is working properly but the signed apk is not working properly at authentication section. it does not send verification code. please help me out configure it..
Often, this kind of problem is linked with the android permissions. The app works fine in debug mode because android is "allowing" your phone by default.
Try to add the "android.permission.INTERNET" in your android manifest and try to deploy the app again.
Hope this is helpful, good luck
You need to add SHA1 of your release key store file in firebase console.
you can get SHA1 with follow command
keytool -list -v -keystore {keystore_name} -alias {alias_name}
eg:
keytool -list -v -keystore C:\Users\me\Desktop\release.jks -alias sample
Related
My firebase authentication used to work smoothly on my IONIC app on both iOS and Android.
Testing on Android after quite a few changes working on IOS side, I can no longer make a google login, though it still works well on iOS it gives me this on Android.
I already checked my SHA1 and SHA256 configuration in firebase console.
Loging in with google also works on a web browser. It only fails on Android.
Any suggestion is welcome.
I had the same problem in the Ionic Capacitor for android version...
Check if your SKD was automatically updated...
I don't know why it changed my SHA-1 run the command to get the SHA-1 and compare with the atual in your firebase (mine was different)
-> keytool -exportcert -list -v -alias androiddebugkey -keystore %USERPROFILE%.android\debug.keystore
go inside your firebase console (console.firebase.google.com) include the new SHA-1 and download your new google-service.json, change the file in your project and try again - for me works fine
The IOS application works fine due to the firebase didnt need the sha-1, but only the package ID
I Checked again and found that I created a new key for my project, this changed the SHA-1, so I included the SHA-1 in firebase, both for debug and release, after this, google login returned to work
keytool -list -v -keystore C:\Users\biel7\.android\Release.jks -alias Release
using the command above, returns my release SHA-1, because in my case when i tried to create the release APK the google login stopped works
I am building an app with Firebase Authentication and Realtime Database. Before yesterday, it was working cool in my device while testing. But I am not able to even login with Firebase now, but the app is working on other devices of my friends.
What is the actual issue here ? Is there any limitation for testing app your own real device? Is some kind of limitation exceeded ?
I tried uninstalling the app and reinstalling, removing user account from firebase database. But still no work.
Thanks!!
In my case, it would work on an emulator but not on my actual device. The solution was resetting my WiFi router. I don't know why it worked but it did. This answer helped me: Firebase database listeners don't work on android with wifi
I faced the same issue and found the solution.
The Google Sign in works fine on emulators or on connected test devices but not on actual devices that downloads the your firebase app from google play store. This is because the apk file generated by your android studio is signed by default debug certificate fingerprint where as the application you publish on google play store is signed by different certificate finger print.
Both the certificate finger print should be whitelisted in firebase console otherwise the google sign in will not authenticate the user.
So to resolve this issue follow two steps.
Generate the release certificate fingerprint with following command on MAC
MAC:
keytool -exportcert -list -v \
-alias your-key-name -keystore path-to-production-keystore
you will get output like following :
keytool -exportcert -list -v \
-alias aliasName -keystore /pathToKeystore/keyStore.jks
Enter keystore password:
Creation date: 27 May, 2017
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate fingerprints:
MD5: 11:D0:F1:F6:26:F3:44:77:88
SHA1: D6:44:55:66:77:88:99:55:HH:AC:DB:17:8A
Where SHA1: is your fingerprint key, copy it.
For more info on how to generate fingerprint on MAC/WINDOWS visit https://developers.google.com/android/guides/client-auth
Paste above SHA1 key to your firebase "Project Settings" and save. Google sign in should work fine now.
To read more on how this works visit https://developer.android.com/studio/publish/app-signing.html
I am developing an app which requires google maps on android. Earlier I was developing on Windows and everything was working perfectly. A few days ago I switched to ubuntu and the maps suddenly stopped working. I have added the sha1 key to the console -
API key:
AIzaSyDD3ntjHTCKntDoVJt7J_eMZs-t7lYIlZ8
Android apps:
98:26:30:05:AF:D7:74:3F:5F:C1:BF:D6:24:80:5E:9B:DC:F4:F4:D6;com.opaxlabs.boatbrat EB:53:F8:2A:B3:05:63:5E:3F:CF:17:47:63:A8:8B:FA:C8:67:30:D4;com.opaxlabs.boatbrat
Activated on: Jun 25, 2014 5:07 AM
So that I have two sha1 fingerprints. I switched back to windows to check and the app was working perfectly there. The error in log cat states that -
Google Maps Android API(10773): Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).
The build when run on devices shows a blank screen where there should be a map.
The api key is mentioned in the manifest as -
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyDD3ntjHTCKntDoVJt7J_eMZs-t7lYIlZ8" />
Also in the emulator it asks me to update the api showing me a button to update which when clicked crashes the app. Please help me with your suggestions. Thanks in advance.
Edit:
The problem seems to be in the fact(Although I am not sure about it) that I had created a demo project on the google console and put the sha1 in it. Later I created a project and put a sha1 in that too. It seems that it was taking the key from the demo project and not the proper project. I have deleted the contents of the demo project but to no avail. Is there a way to correct this problem?
Open terminal
navigate to /usr/lib/jvm/java-1.7.0-openjdk-amd64/bin (bin of java )
write On terminal :- keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android
4.copy the SHA1 key and paste in place of the previous SHA1 of your windows
dont change anything else.
its working......
Seems like an issue with the api key.
Generate sha1 of the debug certificate on your ubuntu, and add it to the api console as another key in addition to the sha1 of certificate from windows.
That should solve the problem.
Regenerate sha on your pc,
Go to google console,
Create new Android key (for google map),(delete the old)
For Linux:
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
Copy sha with name of your project , for example: (Sha;projectname)
98:26:30:05:AF:D7:74:3F:5F:C1:BF:D6:24:80:5E:9B:DC:F4:F4:D6;com.example.androidapp
Copy API key to app.
In google console your Android apps have 2 times sha and project name.
I am confused from the thing which I have experienced
I use Google Map API v2 for my application. I have use the map
fragment to display the map. It works fine on many of devices above to
2.2. It works perfectly when running direct to device but when I export application to a *.apk and then install into the device, run
the application, It only show white screen.....
I have search for this problem, the solution comes that use API KEY with the signing of apk. I dont know how to sign the apk? And what is the release key?
Please help me I am stuck from last 2 days. Thanks in advance..
Facing this error..
UPDATE :
My mistake is that I have not used the SHA fingerprint which is
generated when apk is created. It is displayed first time in the console
and next time on to the apk export screen.
Here are screen shots of the same
FIRST TIME OF APK CREATION :
NEXT TIME :
Thanks everyone for your valuable suggestions and responses. Thanks.
You need to do the following things to get your Maps Visible for both Debug Mode and release mode
-1 Add debug key to package combination at Google API console
-2 Add release key to page combination at Google API Console
Note : you need to add at lease 2 combination to get your maps visible when you are testing and when you generate *.apk file.
What you are missing right now is not adding the release key to application package combination to API console add this and after that do the following:
replace your debug map key with release key and generate your *.apk and install aplication to your device you will get your maps
there are several Tutorial available on net i would to suggest you the following one
Google Maps
To Generate the Release key do the following steps
Open CMD (in Windows) terminal (in Linux?MAC os) find the path to your jdk dir and then to bin like following:
C:\path-to-jdk\jdk1.7.0_07\bin>keytool -v -list -alias tt -keystore path-to-keystore -storepass password -keypass passowrd
for me the path is following for Jdk/bin and that for key store
C:\Program Files\Java\jdk1.7.0_07\bin>keytool -v -list -alias tt -keystore D:\ke
yStore -storepass password -keypass password
you need to give the following things of your own
-1 path to jdk
-2 path to keystore
-3 keystore passoword
-4 keypass password
You can generate api key here: https://code.google.com/apis/console/
About release key, it's this article: http://developer.android.com/tools/publishing/app-signing.html But this is not required, default sign by debug.keystore. Below nice tutorial about this.
Here is official Google tutorial about map v.2: https://developers.google.com/maps/documentation/android/start
I have a good tutorial regarding this, each step is explained via screenshot
http://androidstudies.wordpress.com/2013/05/30/view-map-in-you-android-applicatiopn/
actually Api key is for security purpose so that no fake requests are sent to google server(some times hackers do such things)
There are two keys.Debug and release key. Debug key works for unsigned apk and release key works for signed apk. If you signed your apk by means of debug key, then your map looks blank.
So if you export your application, use release key.
Release key procedure, you can follow here.
Google Map Android API v2 can't display map in play store application
Follow this step by step process:
step1:Create key store
C:\Program Files\Java\jdk1.7.0_21\bin>keytool -genkey -v -keystore keystorename.ke
ystore -alias pwd -keyalg RSA -keysize 2048 -validity 10000
step2: convert all required android projects to ant project to run 'ant release'
E:\myworkspace\sample\myproject>android update project --path .
step3:Run ant release
E:\myworkspace\sample\myproject>ant release
Step 4: Sign apk
E:\myworkspace\sample\myproject>jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore path\to\keystore path\to\generate\unsigned.apk pwd
Step 5: verify signed jar
E:\myworkspace\sample\myproject>jarsigner -verify -verbose -certs path\to\generate\unsigned.apk
Step 6: align apk
E:\myworkspace\sample\myproject>zipalign -v 4 path\to\generate\unsigned.apk "path\to\final\released\final.apk"
Refer this link: http://developer.android.com/tools/publishing/app-signing.html
I have checked a lot of questions around map tiles not loading on android device. I have not been able to fix the same error I have.
I am able to test on both emulator and device my mapsview in my application with the debug key. It works absolutely fine. I had generated a maps api key for my debug certificate.
I then created a maps api key for my release certificate with its MD5. I have added that to my maps view and now the application is not working.
I have added android internet permission in the correct place in manifest file.
I have correctly generated the MD5 finger print as I did for debug key.
I have only one mapview in my app so I have just changed that api key in the layout xml.
Only difference in generating key for debug and release is this: In the command options for keytool for the release certificate I was asked passsword only once which I presume is the store pass. my key pass was never asked (actually they are the same)
I generated debug keystore MD5 like this
$ keytool -list -alias androiddebugkey \
-keystore <path_to_debug_keystore>.keystore \
-storepass android -keypass android
I created the release key MD5 like this
$ keytool -list -alias myalias_name -keystore "mykeystorepath"
I have also tested the app with the android store still no luck. What am I missing? Any help is greatly appreciated, thanks guys!
use eclipse for generating the key and exporting, also don't rely on the DEBUG variable( Android: automatically choose debug/release Maps api key? ) to switch at runtime the keys because that's broken at the moment, you have to export the app, get the md5, get the key based on this new md5, switch the map key, reexport
edit:
important steps of https://developers.google.com/maps/documentation/android/mapkey
1) $ keytool -list -alias alias_name -keystore my-release-key.keystore (NOT DEBUG KEY)
2) https://developers.google.com/android/maps-api-signup
3) update code with new key
4) clean project & build (important to clean, eclipse doesn't always do it)
5) export with eclipse
Ok all, here is how silly it was. All was fine except for the fact that I placed the key in a layout file that I was not using. Probably I was out of my mind. So quickly
The maps application will work with release key even if you just export signed application. It is not necessary that the application be put in Android store for it to work. There are some misleading comments in stack overflow that state this.
The keytool will ask for password of the keystore and it will use the same to unlock the alias key too. Only if it is different it will ask again.
The maps application with release key will work with emulator too. Just rmbr to use install adb ""