androidxamarin.androidgoogle-maps-api-2

Google Maps work with Android Release APK but not AAB


I have an app developed with Xamarin.Android and I recently added a map to it. I created my Key in the Developer console and restricted it with my fingerprints for Debug and Release. In Debug the map works fine.

If I build an APK of the Release app and sign it (with the certificate I used to get the fingerprint) and deploy the app to my phone then the map works fine.

If I build an AAB (AppBundle) and sign it with the same certificate and publish the app on the Play Store and download the app on my phone I get the blank screen that only says Google and has the zoom buttons.

Of course Google now wants you to upload the AAB, not the APK but I can't get the map to work. This is the same app, same code, same certificate, testing on the same phone only difference is when building selecting apk or bundle.

Anyone encountered this problem?


Solution

  • The issue is that the documentation https://docs.expo.io/versions/latest/sdk/map-view/#deploying-to-a-standalone-app-on-android mentions that you have to get the Google Certificate Fingerprint by running a command in the pc, but the truth is, that certificate you have to obtain it from the developer play store page of your application.

    and you could see :

    If you've enabled Google Play's app signing service, you will need to grab their app signing certificate in production rather than the upload certificate returned by expo fetch:android:hashes. You can do this by grabbing the signature from Play Console -> Your App -> Release management -> App signing, and then going to the API Dashboard -> Credentials and adding the signature to your existing credential.