Skip to content

IlmaRazak/Integrate-Google-map-into-Android-Studio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Integrate-Google-map-into-Android-Studio

This is a simple project to integrate Google map into Android Studio. Here, I generate Maps SDK for Android and API key. These are the steps which I follow

  1. Create New Project.
  2. Select Template (Google Maps Activity).
  3. Open google_maps_api.xml
  4. Welcome page of my google cloud console account (https://console.cloud.google.com)

3

  1. Create a new project and Click Create API Key button.
  2. Generated API KEY (Maps SDK for Android)

  1. Check whether API services are enabled or not.

7

  1. Copy the API KEY and paste it to the google_maps_api.xml file (Android Studio).
  2. Select the MapsActivity.java file from the APP->Java directory.
  3. Run the default code (application) and get the emulator/device output.

Then, add Longitude and Latitude for Google Maps on Android (hardcoded values). After that,

  1. Implement the code inside the onCreate method and get the Longitude and Latitude using the getFromLocation() method.
  2. Add your hometown address (String values).
  3. Implement getLongitude(), getLatitude(), getCountryName().
  4. Run and get the above three values using the Logcat view.

Finally, show the current location

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors