Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get google map apikey in android

Hi At that time working on google map. I want to display map in my activity. I successfully display the map view. But i cant show the map i think i have wrong api key so how can i get api key of google map. I create the keystore and all procedure but i didn't have idea how to get api key from this keystore.

I also give the all permission in manifest file and also add the google map library than also i cant show the map.in activity also extends mapactivity and also write code fro map in xml.

If anyone knows about that please tell me.

like image 328
ishu Avatar asked May 09 '13 12:05

ishu


People also ask

Where is Google API key stored android?

According to Google Documentation to store API keys securely it is recommended to use local properties. If you don't have the file local. properties in your project, it should be located in the android project root directory. Make sure to add it to intentionally untracked files in your version control tool.

Is Google Maps API free for Android?

Note that the Maps Embed API, Maps SDK for Android, and Maps SDK for iOS currently have no usage limits and are at no charge (usage of the API or SDKs is not applied against your $200 monthly credit).

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.

Is Google Maps API key secret?

API keys are not strictly secret as they are often embedded into client side code or mobile applications that consume Google Cloud APIs. Still,they should be secured and should never be treated as public information.


1 Answers

If you already have the key got the link below and add the fingerprint along with your android project package name

You also need to login to your google account

https://code.google.com/apis/console

enter image description here

Click on create new key. Add the fingerprint along with your android project package name.

enter image description here

You can see the api key above

Enable google map api v2 from services tab.

enter image description here

Then in manifest file under application tag

 <meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="my key"/>
like image 86
Raghunandan Avatar answered Sep 17 '22 17:09

Raghunandan