Android Google Maps API Tutorial – Getting Started

This is android google maps api tutorial.

In this tutorial I will teach you to integrate google maps in your android app using google maps api v2.

This API provides us various functionality like showing locations in map, showing routes, add marker, etc.

Android Google Maps API Tutorial

Android Project

1. Open Android Studio and go to New Project option. Now give a name to your project and press Next.

Android Google Maps API Tutorial

2. Choose Google Maps Activity, choosing this activity makes easier to integrate google maps.

Android Google Maps API Tutorial

3. Click Next and finally click on Finish to create the project.

Getting API Key

For using google maps in our project we need API key. It can be obtained in following way.

1. After creating the project you will see a file google_maps_api.xml as shown in below image. Copy the URL given in it and open it in browser.

Android Google Maps API Tutorial

2. You will see a page as shown below. There agree with the terms and click Agree and continue. Make sure you are logged in to google account.

Android Google Maps API Tutorial

3. Then click Create API key button.

Android Google Maps API Tutorial

4. On the next page you will get API key, just copy it.

Android Google Maps API Tutorial

5. Finally paste the API key in google_maps_api.xml file under string tag.

Android Google Maps API Tutorial

6. Save and run the project.

When we created the project by default we got the code to display a simple google map with a marker at some location. Make sure google play services is installed and internet is enabled in the device on which you are running this app.

Android Google Maps API Tutorial

Comment below if you have any doubts related to above tutorial.

2 thoughts on “Android Google Maps API Tutorial – Getting Started

  1. waleedkhan

    i want to work in andriod developer please provide me eclipice or andriod studio

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *