Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generating Google map Release API Key

My app uses Google Maps, I signed up for a Google Maps key to debug, it worked. But now, I need a Google Maps key in release mode, before publishing. How can I get it?

like image 938
stations essence Avatar asked Apr 30 '12 16:04

stations essence


People also ask

Can I get Google Map API key free?

Getting a key itself is free, and Google offers a limited free trial that includes $300 in credit for your first 90 days of use. After your trial, Google will provide $200 of credit per month toward your Maps API usage.

Can Google Maps API key be public?

You may use an unrestricted API key with any Google Maps Platform API or SDK. However, we strongly recommend that you restrict your API keys, especially in following scenarios: The test environment will be or is publicly visible.

Can you expose Google Maps API key?

If you're building a GCP application, see using API keys for GCP. When you use API keys in your Google Cloud Platform (GCP) applications, take care to keep them secure. Publicly exposing your credentials can result in your account being compromised, which could lead to unexpected charges on your account.


2 Answers

You need to :

  1. Create your own signing key that you will use for publishing, using Keytool : http://developer.android.com/guide/publishing/app-signing.html#cert

  2. Get the MD5 fingerprint of your newly generated key : https://developers.google.com/maps/documentation/android/mapkey#getfingerprint

  3. Submit the signature to this link to get your Google Maps key : https://developers.google.com/android/maps-api-signup?hl=fr

  4. Export your application with your newly created key, in Eclipse : right click on your projet -> Android Tools -> Export signed application package.

Be careful to keep your certificate in a safe place, because you will need it if you want to publish an update of your app on Google Play.

EDIT :

For the Google Maps Android V2, the signing is a little different. You will need to get the SHA-1 signature and provide the package name of your application as well. A Google APi account is moreover needed. All info are given on this page : https://developers.google.com/maps/documentation/android/start?hl=fr#the_google_maps_api_key

like image 101
Raphaël Titol Avatar answered Oct 09 '22 03:10

Raphaël Titol


Before publishing application into play store you have to follow some step to create release key.

Step 1: First find your key store location. Ex. D:\Harshid\testKeystore

Step 2: Run this command.

keytool -list -v -keystore D:\Harshid\ testKeystore -alias D:\Harshid\ testKeystore 

please used fully qualified name of keystore.

Step 3: Copy SHA1

Step 4: Follow this google map api console.

like image 44
Harshid Avatar answered Oct 09 '22 04:10

Harshid