Google Maps for Android – Tutorial – Mobile App Development, Android App Development, iphone App Development class="post-template-default single single-post postid-1777 single-format-standard wp-custom-logo"

Google Maps for Android – Tutorial

Using Google Maps in Android Application includes several steps.

1. Install the Android SDK

As a prerequisite, you need to install the Android SDK. See Get the Android SDK.

2. Download and configure the Google Play services SDK, which includes the Google Maps Android API. If you use theGoogle Maps Mobile SDK for Business you must download and configure the Google Maps Mobile SDK for Business static library.

The Google Maps Android API v2 is distributed as part of the Google Play services SDK. You can download the Google Play services SDK via the Android SDK Manager.

To test your app when using the Google Play services SDK, you must use either:

  • A compatible Android device that runs Android 2.3 or higher and includes Google Play Store.
  • The Android emulator with an AVD that runs the Google APIs platform based on Android 4.2.2 or higher.
  • Add Google Play Services to Your Project
  • Create a Android Application Project.

Google Maps for Android

  • Import the Google Play Services into your workspace.

To import the Google Play Services into your workspace , first create a android project from existing resource.Then goto path ..sdk/extra/google/googleplayservice.

Google Maps for Android

Then copy the project in to the workspace..

  • Make this project as the library project of your project.
    Right Click on the project, then go to properties and the Android Section. Add google play service as library project.

Google Maps for Android

After you’ve added the Google Play services library as a dependency for your app project, open your app’s manifest file and add the following tag as a child of the element:

[code lang=”js”]
<meta-data android:name=""
android:value="@integer/google_play_services_version" />

3. Obtain an API key

Maps API keys are linked to specific certificate/package pairs, rather than to users or applications. You only need one key for each certificate, no matter how many users you have for an application. Applications that use the same certificate can use the same API key. However, the recommended practice is to sign each of your applications with a different certificate and get a different key for each one.

Obtaining a key for your application requires several steps.

  • Create key for your application

Google Maps for Android

Enter your SHA-1 fingerprint and the package of your application separated by a semicolon. For example you can use the org.aynsoft.mapDummy package.

Google Maps for Android

4. Add the API key to your application

Follow the steps below to include the API key in your application’s manifest, contained in the file AndroidManifest.xml. From there, the Maps API reads the key value and passes it to the Google Maps server, which then confirms that you have access to Google Maps data.

  • In AndroidManifest.xml, add the following element as a child of the element, by inserting it just before the closing tag :

[code lang=”js”]

Substitute your API key for API_KEY in the value attribute. This element sets the to the value of your API key, and makes the API key visible to anyMapFragment in your application.

  • Save AndroidManifest.xml and re-build your application.

Specify permissions

Specify the permissions your application needs, by adding elements as children of the element. The syntax is:

[code lang=”js”]
<uses-permission android:name="permission_name"/>

For example, to request the Internet permission, add:

[code lang=”js”]
<uses-permission android:name="android.permission.INTERNET"/>

Besides permissions required by other parts of your application, you must add the following permissions in order to use the Google Maps Android API:

Google Maps Android API uses OpenGL ES version 2 to render the map

[code lang=”js”]

5. Add a Map

  • 1. Add the following fragment in the app’s layout XML file. If you created a ‘hello world’ app using the Android Developer Tools (ADT) package in Eclipse, the file is at res/layout/activity-main.xml. Replace the entire contents of that file with the following code.

[code lang=”js”]
<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android=""

  • 1. Add the following code in

[code lang=”js”]
package com.example.mapdemo;

import android.os.Bundle;

public class MainActivity extends Activity {

protected void onCreate(Bundle savedInstanceState) {

Build and run your application. You should see a map. If you don’t see a map, confirm that you’ve completed all the steps described on this page.


Over the years we have developed several Google Map, mashups Android and iPhone components, code modules and Frameworks that can work as plug and play solutions for developing new apps that will substantially reduce the app development cost and time.

Contact us to discuss your multimedia mobile application development project.

Warning: _() expects exactly 1 parameter, 2 given in /home2/mobilemeri7/public_html/wp-content/themes/mobilemerit/comments.php on line 28

Write a Reply or Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed. siteleri arkadaş bulankara nakliyatankara nakliyatistanbul nakliyatankara nakliyathovarda betantalya çittrbetJigolodiyarijigolo sitesijigolo kayitciporndox.com18avx.comtotoleak.comizmir escort bayanalsancak escortbuca escorttercümanlık bürosuistanbul hair transplant pricejigolo sitelerimjigolo şirketlericast ajans yeni yüzlerjigolo sitelerijigolo baş
ümraniye escort ataşehir escort escort bayan
Hack haber Hacklink Hack forum Hd film izle php Shell indir Hack haber