Here in this article i will explain about the easiest way to integrate Google Map into your project.
Google Map is one of the most widely used android app in the world. Many applications demand such a widget. So Google is giving this widget to developers as Play Service.
If a product is given as a Play service then development overhead is reduced very much. It became very easier to integrate. More over to make Google map integration even more easier Google is providing a nice template which is called “Google Map Activity”. If you select this template as your primary activity then rest of the things will be much more easier.
These are as follows,
Start Android Studio And Create New Project
Choose Google Map Activity Template
This template will create activity with google map fragment and auto generate map related methods in activity.
Replace with your API key
In order to work Google map in our application we have to use Google API Key for android application. By this API key we can access Google servers. This key is free and can support unlimited number of users.
Steps to generate Google API Key
1. Copy the credentials provided in the google_maps_api.xml file.
2. Go to the Google Developers Console/ in your browser.
3. Use the copied credentials to add your app to an existing API key or to create a new API key. For more details, see the Complete Process.
The full process for getting an API key: If neither of the above options works for your situation, follow the Complete Process.