On September 14th, 2017, we published revised versions of our Privacy Policy, Terms of Service and Website Use Policy and published a Cookie Policy. Your continued use of Lynda.com means you agree to these revised documents, so please take a few minutes to read and understand them.

After setting up your application permissions in the manifest,…the next step is to get an API key.…API keys are required for all Google services.…There was an API key that was used in the Google Maps Android…API v1, but you can't get new versions of those API keys any more.…You can only get them for v2, the version that we'll be using.…To get an API key you'll need to get some information from…your key store, the file that you use to sign the application.…Each application has two key stores at least,…one that's used for production, to sign the application…before it's deployed to the Google play store…or other markets, and one at least for debugging.…

I'll be working with the debug key store for most of this course.…So, that's the key store that I want.…To create the API key, go to the Google API's…console, available at the URL https://code.google.com/apis/console.…If you're aren't already logged in with…the Google login, you'll be prompted to login.…And if you don't have a Google login, you can create one for free.…

Resume Transcript Auto-Scroll

Author

Released

8/7/2013

Maps make mobile apps more useful; they can help users find businesses and areas of interest, get directions, or gain insights into new communities. In this course, learn to add interactive maps to your Android apps with Google Maps Android API v2. David Gassner first shows you how to set up the tools, get an API key, and import and link to Google Play services. After an introduction to presenting simple maps with the MapView and MapFragment classes, the course describes how to set a map's initial state, switch between different map types, work with map markers, draw shapes, and work with zoom controls, the My Location button, and various user gestures. Finally, learn to add a map to an existing app and prepare it for distribution.

Note: An Android device with Android 3.0 (Honeycomb) or higher, and that has Google Play Store installed, is required to use the course exercises. (Kindle Fire and Nook devices do not qualify.) Finished mapping apps can be deployed on Android 2.2 (Froyo) or later.

Topics include:

Setting up the developer tools

Adding required permissions

Getting a Google Maps API key

Importing and linking the Google Play services

Setting a map's initial state

Geocoding an address

Getting the current location programmatically

Adding map markers

Handling marker events

Drawing lines, polygons, and circles

Adding maps to existing apps

Skill Level Intermediate

3h 50m

Duration

128,941

Views

Show MoreShow Less

Q: In the Chapter 2 movie "Checking the device for the Google Play services APK," when I create my first Google Maps app, the app crashes when I call the custom method servicesOK(). The error in LogCat starts with:

"java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value."

How do I fix this?

A: The latest version of the Google Play services library has a new required meta-data tag in the app manifest. Add the following tag within the <application> tag: