Day 13: How to Integrate Google Maps in an Android application [API V2]

On Day 13, we’ll learn how to
1. Integrate Google Maps to our application using MapFragments
2. Use GoogleMaps class
3. Use MapFragments
4. Draw markers and shapes (Polylines, Polygons and Circles) on Map

Slides:

Part 1:

Part 2:

Part 3:

Videos:

Part 1:

Part 2:

Source Code:

google-play-services_lib [Download]

GoogleMapsDemo [Download]

About these ads

7 thoughts on “Day 13: How to Integrate Google Maps in an Android application [API V2]

  1. Ahsan bhai, I have followed slide 1 and I think I have done whatever instructed in that slide. When I run my app in a real device (in debug mode) it only shows the +- symbol, no tiles are generated, no maps are visible.
    I have generated my SHA1 fingerprint using a keytool (details in this video: https://www.youtube.com/watch?v=IaXE2FUENFI ) . Is there any possibility that the map won’t generate because of the API key?
    If the logcat view is required, I will try to give it asap :(

  2. So let me explain:
    Following that video, you have generated a keystore file. That is your release keystore.

    By default when you run your project, aapt tool builds your apk file and then sign it with debug keystore by default. But if you use API key using your release keystore you’ll have to use your release keystore to sign your apk file and then use that apk file to install in your device. So keystores must be same for the following 2 purposes:
    1. Generating SHA1
    2. Signing the apk

    If the keystores are not same, google map server will not serve your app with the tiles.

    So what you’ll have to do is:
    1. Right click on your project-> Android Tools->Export Signed application Package and then proceed with it
    2. Choose path of your release keystore file while prompted along with password
    3. At last you’ll get an apk file

    Copy this apk file to your device SDcard and install it.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s