

The MapsActivity.java file instantiates the SupportMapFragment class and uses the class's getMapAsync() method to prepare the Google Map. You can include SupportMapFragment in a layout file using a tag in any ViewGroup, with an additional attribute: android:name=".maps.SupportMapFragment" MapsActivity.java The SupportMapFragment class is a subclass of the Fragment class. This layout file contains a single fragment that fills the entire screen. In this practical we only use the debug certificate. The file for the API key for the release certificate is located in src/release/res/values. The file for the API key for the debug certificate is located in src/debug/res/values. The template generates two google_maps_api.xml files: one for debug and one for release. You use this configuration file to hold your API key. Change the Title to "Wander" and click Finish.Īndroid Studio creates several maps-related additional files: google_maps_api.Leave the default Activity Name and Layout Name.Select the Google Maps Activity template.

Accept the defaults until you get to the Add an Activity page. 1.1 Create the Wander project with the Maps template Note: If you want to build the Activity without using the template, follow the steps in the API key guide to obtain the API key without using the link in the template.
CREATE A MANUAL GOOGLE MAP FOR POKEMON GO CODE
The template code includes a google_maps_api.xml file containing a link that simplifies obtaining an API key.

For more information about obtaining a release certificate, see Get API Key.Īndroid Studio includes a Google Maps Activity template, which generates helpful template code.
CREATE A MANUAL GOOGLE MAP FOR POKEMON GO ANDROID
Published Android apps that use the Google Maps API require a second API key: the key for the release certificate. The debug certificate is insecure by design, as described in Sign your debug build. In this practical, you use the API key for the debug certificate. For more about using digital certificates and signing your app, see Sign Your App. The API key is tied to a digital certificate that links the app to its author. To obtain the API key, you register your project in the Google API Console. The Google Maps API, like the Places API, requires an API key. The Wander app allows you to drop markers onto locations, see your location in real time, and look at Street View panoramas. In this practical you create the Wander app, which is a styled Google Map. Enable location tracking and Street View in your app.Add custom features to your app such as markers, styling, and location tracking.Create the Wander app, which has an embedded Google Map.Get an API key from the Google API Console and register the key to your app.Enable the user to place a marker on a point of interest (POI).Including external libraries in your adle file.Creating, building, and running apps in Android Studio.In this practical, you create a Google Maps app called Wander. You can also create games tied to the real world, like Pokemon Go. You can add value to the standard Google Maps by showing information from your own data set, such as the locations of well-known fishing or climbing areas. Introductionīuilding apps with Google Maps allows you to add features to your app such as satellite imagery, robust UI controls, location tracking, and location markers. Note: This course uses the terms "codelab" and "practical" interchangeably. You will get the most value out of this course if you work through the codelabs in sequence.įor complete details about the course, see the Advanced Android Development overview. This codelab is part of the Advanced Android Development training course, developed by the Google Developers Training team.
