Building Mobile Apps with Google Maps Android API v2
Illustration by Don Barnett

Building Mobile Apps with Google Maps Android API v2

with David Gassner

Video: Preparing the app for distribution

When your Android app is finished and ready for distribution, you'll need to export it so that it can be added to the Google Play store, or otherwise distributed to your users. When you export it for general use, you'll use a different key store then you used during development. You'll use a certificate that you generate either from eclispe or from the command line. This new key store will have a different SHA1 fingerprint then your debug key store and that fingerprint must be registered with the Google API's console.
Expand all | Collapse all
  1. 9m 51s
    1. Welcome
      52s
    2. What you should know before watching this course
      3m 50s
    3. Using the exercise files
      5m 9s
  2. 18m 55s
    1. Understanding the Maps API terms of service
      3m 51s
    2. Setting up the developer tools
      3m 33s
    3. Connecting and testing an Android device
      5m 45s
    4. Using the SDK documentation
      2m 22s
    5. Demonstrating the finished apps
      3m 24s
  3. 33m 49s
    1. Adding required permissions to a project
      6m 53s
    2. Getting a Google Maps API key
      8m 9s
    3. Importing and linking the Google Play services library
      3m 46s
    4. Checking the device for the Google Play services APK
      9m 4s
    5. Displaying your first map
      5m 57s
  4. 51m 13s
    1. Displaying a map with MapView
      6m 36s
    2. Getting a reference to the map object
      5m 35s
    3. Setting a map's initial state in the layout
      6m 26s
    4. Setting a map's initial state programmatically
      6m 42s
    5. Geocoding an address to get its coordinates
      8m 10s
    6. Changing between different types of map objects
      4m 23s
    7. Maintaining map state between activity restarts
      13m 21s
  5. 21m 3s
    1. Enabling the My Location button
      6m 26s
    2. Getting the current location programatically
      8m 16s
    3. Listening for current location updates
      6m 21s
  6. 38m 47s
    1. Adding map markers
      4m 52s
    2. Removing map markers
      4m 5s
    3. Customizing marker icon graphics
      4m 55s
    4. Displaying default info windows
      1m 53s
    5. Customizing marker info windows
      8m 49s
    6. Handling marker events
      7m 59s
    7. Dragging and dropping markers
      6m 14s
  7. 24m 54s
    1. Drawing lines
      8m 48s
    2. Drawing polygons
      8m 3s
    3. Drawing circles
      8m 3s
  8. 31m 21s
    1. Reviewing the tour finder application
      4m 19s
    2. Adding a map fragment to an activity
      11m 54s
    3. Passing the current location to another mapping app
      7m 31s
    4. Displaying Google Play services license terms
      5m 2s
    5. Preparing the app for distribution
      2m 35s
  9. 27s
    1. Next steps
      27s

Start your free trial now, and begin learning software, business and creative skills—anytime, anywhere—with video instruction from recognized industry experts.

Start Your Free Trial Now
please wait ...
Watch the Online Video Course Building Mobile Apps with Google Maps Android API v2
3h 50m Intermediate Aug 07, 2013

Viewers: in countries Watching now:

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
Subject:
Developer
Software:
Android
Author:
David Gassner

Preparing the app for distribution

When your Android app is finished and ready for distribution, you'll need to export it so that it can be added to the Google Play store, or otherwise distributed to your users. When you export it for general use, you'll use a different key store then you used during development. You'll use a certificate that you generate either from eclispe or from the command line. This new key store will have a different SHA1 fingerprint then your debug key store and that fingerprint must be registered with the Google API's console.

I'm working with the version of my project that is not included in the exercise files, its called TourFinder1.0 and this is the version that I'll be uploading to the Google play store. I'll select File > Export, and then under the Android category, I'll choose Export Android Application. I'll choose the project and click Next. And then, I've already created a key store file. After selecting it, I'll type in the key store password.

I'll click, Next. Then I'll select the, Alias and I'll type in that password. And click Next again. On this screen, before you complete the expert operation, you'll see the key store fingerprints, including the SHA1 fingerprint. This is the fingerprint you need to register in the Google API's console. I'll select and copy it, and then, finish the export process. Then I'll go to the Google API's console, and I've selected my project, Explore CA TourFinder. Before I recorded this movie, I'd already gone through this process, and I added the SHA 1 fingerprint for the production certificate to this list.

It's right down here. It starts with the finger print and finishes with the package of the app/g. The other three digital finger prints are for different development computers. This architecture allows you to add multiple development computers, and the apps production certificate to a list. And all those fingerprints point to a single API key. And that's the API key that you add to the Android manifest file, right down here. So those are the last steps you need to follow before you deploy your application.

And then you'll be ready to upload the app to the Google Play store or another Android market or otherwise distribute your app with Google Maps to your users.

Find answers to the most frequently asked questions about Building Mobile Apps with Google Maps Android API v2 .


Expand all | Collapse all
please wait ...
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:
 
<meta-data
     android:name="com.google.android.gms.version"
     android:value="@integer/google_play_services_version" /> 
 
After rebuilding the app, the error should be resolved. 
 
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

* Estimated file size

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Building Mobile Apps with Google Maps Android API v2.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.