MAP ACTIVITY IN ANDROID STUDIO
- Install Google play service SDK tool
First of all we have to install Google play service SDK tool in adroid studio.
settings → Appearance and behaviour →system setting →Andoid SDK
- Create a Google Map project
- Get the Google API key
After loading the builded project u can see a xml file as google_maps_api.xml
.In that xml file there is a guide to get an api key.The key is free.
- First copy the link that in xml file and search it in google
- It takes you to google API console.Then create a new project and create an API key for your project
- Copy that API key and paste it your XML file in String tag
- Without using that link u can also go to developer console and make a new project and follow the below steps.Then also u can get API key
Now u have to add package name and SHA certificate fingerprint before crete API key.
Go to your project and get the package name.To get fingerprint u can run below code in your terminal.
keytool -list -v -keystore mystore.keystore
U have to replace mystore with your keystore name.
How to find keystore name?
go to android/ directory and run ls command and can find the the name of keystore
Now after create API key u can add it to your xml file in that they provided.