I’ve having some trouble with the Google Map after submitting to the Google Play Store. My app uses Google Sign in which is working sometimes. However, it also uses the MapView and on Android when app is published and downloaded through Play Store the app simple won’t show.
The weird thing is that it’s there though. The Google logo at the bottom left is showing but the Map container is a grey box. I’ve logic for when map is pressed, such as read coordinates and this works when I press the map (!) It’s just that the actual map (or the layout of a map) is not showing.
I’ve read some about this on the forum but there is no real silver lining on how to resolve this. I’ve read that people have had problems with the hash being changed by Play Store due to App Signing.
Added the necessary keys on Google API and enabled the API’s used.
I’ve replaced the certificateHash (SHA-1) in app.json with the one from App Singning on Play Console. (Have also tried the one from the APK using the keytool -list -printcert -jarfile growler.apk | grep SHA1 | awk ‘{ print $2 }’ but with that the Sign In doesn’t work so I suppose the map wouldn’t work had I gotten to it.
I’ve rebuilt the application with exp build:android. Didn’t do it, so I released a new version on Play Store with the new APK created, and that didn’t do it either.
So I’m out of ideas here. As I said, Google Sign in works, map loads but doesn’t show any view of a map, just the things mentioned above. Pressing the map works which is really strange. My logic for map pressing is to collect coordinates from the press-event and reverse geocode that to an address and all of that works fine.
I’m using:
Expo SDK 25.0.0
exp CLI 53.1.0
Have tried it on:
Samsung Galaxy A3, SM-A320FL running Android 7.0
Samsung Galaxy S3 (!), GT-I9300 running Cyanogenmod on Android 6.0.1
Hey @layer10! Thanks for writing in, sorry about how long it has taken me to respond.
You may want to try updating your Expo SDK dependencies to the latest below and then report back with details on whether or not the version upgrade worked.
I’ve checked that post and will run a debug on the device and see if anything of use pops up there. But what’s strange for me is that the sign in works fine but the map doesn’t. Although the map is “there” and can be “used” as I said earlier, pressing it works for example, but nothing shows such as streets, buildings and other mappy things. I suppose my google login would have been an issue as well dad there been a problem with the API key or hash.
If I install the standalone built APK on the device the map works, and running it in Expo works as well. So my guess is that something happens with something once the APK gets to the Play Store. And as I said earlier the certificate hash changes due to App Signing on Play Store but I’ve replaced the hash with that one but still no progress.
I’ll investigate some more but I maybe you could ask someone that’s familiar with the Google API’s regarding keys and certificate and maybe we could improve the guides have I missed something Your help is much appreciated!
Found it! A shoutout to @goldeelocks who pointed out that you need to add the new App Signing cert hash to allowed at your API key restrictions. Feel quite the fool for not seeing the obvious
So I’ve added both the standalone APK cert hash from when building with exp but also the one created by Play Store when going trough App Singing and now the map is working like a charm from anywhere I run it
A big thanks to you guys @jesse and @jimmylee for your help!