Google Maps Android API v2 expiring dev API key

De openkb
Aller à : Navigation, rechercher

Sommaire

Questions

https://developers.google.com/maps/documentation/android/start#the_google_maps_api_key https://developers.google.com/maps/documentation/android/start#the_google_maps_api_key

I develop using the dev key. When I am ready to release, I switch to the release key (in AndroidManifest.xml), export my app, and upload it to the Google Play Store. When I go and develop again, I switch back to the dev key, but it no longer works. I have to generate a new on with the Google API console.

How can I get around needing to regenerate the dev key again and again?

Thank you.

Answers

One maps key can easily work with multiple certificates, which allows you to have one Google Maps key, and do not bother which certificate your app is currently signed with.

To assign more certificates to one Google Maps key, simply put certificate hash and package name in separate line, i.e.:

AA:BB:CC.......;com.webnetmobile.test
XX:DD:ZZ.......;com.webnetmobile.test

where AA:BB:CC... is certificate hash. One entry is for your debug certificate another for production. You can also edit current key, to add new entries, so no need to recreate (unless you sure that s mandatory)

Source

License : cc by-sa 3.0

http://stackoverflow.com/questions/17622002/google-maps-android-api-v2-expiring-dev-api-key

Related

Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils