S_S
S_S

Reputation: 1402

Android Map API Key testing in signed app

If I have the release key for Android Map API in my app which was generated using the signing certificate SHA-1 fingerprint and app package name.

How can the map view be tested using this key? We tried generating signed APK and running it on the device but the map was not showing. Is there any way to test this key before publishing the app on the Play Store?

Upvotes: 0

Views: 361

Answers (2)

Farid
Farid

Reputation: 2562

Even if you add release key as suggested by @sudeep, you won't be able to see map in production. It is because Google has introduced a billing system for signed APK's. You'll get $200 worth of free requests per month. To enable billing follow this link https://console.cloud.google.com/billing and enable billing account. After enabling billing go to this link https://console.cloud.google.com/billing/projects. You'll see your projects listed; click more-options (three dots) located at the far-right end of the project and click on change billing then follow steps to add billing to your project.

For further reading: https://cloud.google.com/maps-platform/pricing/sheet/

Upvotes: 1

sudeep rai
sudeep rai

Reputation: 111

There is a separate google_maps_api.xml for release apk. go to project

MyApplication -> app -> src -> release -> res -> values -> google_maps_api.xml

you will find <string name="google_maps_key" templateMergeStrategy="preserve" translatable="false">YOUR_KEY_HERE</string>

replace YOUR_KEY_HERE with your release key

Upvotes: 1

Related Questions