Ken
Ken

Reputation: 295

Google Maps Key between development and release

I have google maps key in my app, it works fine no problem

the problem is when i release my app on google play, I cant see google maps!

I read in some posts that I do not have to change the key as I can use the same for both release and development Google Maps Android V2 debug and release key and Switching between Google Maps Android API v2 DEBUG and RELEASE API Key

and some other posts that say I have to get another key for release Generating Google map Release API Key

Now in my case same key does not work.

I used the link in the google_maps_api.xml to generate the key (application id is the same in release and in development and release) which is

https://console.developers.google.com/flows/enableapi?apiid=maps_android_backend&keyType=CLIENT_SIDE_ANDROID&r=A9:DC:??:??:??:??:??:??:??:??:??:??:??:??:??:??%3Bcom.?????.???????.???

is this part A9:DC:??:??:??:??:??:??:??:??:??:??:??:??:??:?? differ between development and release?

what do i have to do.

thanks

Upvotes: 2

Views: 3048

Answers (1)

Sharjeel
Sharjeel

Reputation: 15798

You have to create two keys. One for development and one for production.

What is the difference between development and production key?

When you compile application for development it's signed with a development key and when you prepare your application for production you sign it with a production key.

Google Maps API key is based on this key. So you have to create two keys one for the time when you compile application for development and one for production.

Can I have the same Google Maps API Key for Development and Production?

Google Maps API requires you provide SHA1 and package name. Package name stays same for development and production. You create SHA1 from a key. This key is different for development and production. So you have to create two different SHA1 and use them for creating key in Google API Console.

You can read more on how to create development and release SHA1 for creating API KEY on Android official page https://developers.google.com/maps/documentation/android/start#display_your_apps_certificate_information

Upvotes: 1

Related Questions