GoogleMaps_AndroidStudio - GOOGLE MAPS ANDROID STUDIO(STEP BY STEP HOW TO Adding Map code(v2 to your Project 1 2 3 4 Download and configure the Google

GoogleMaps_AndroidStudio - GOOGLE MAPS ANDROID STUDIO(STEP...

This preview shows page 1 - 11 out of 56 pages.

GOOGLE MAPS ANDROID STUDIO (STEP BY STEP)
Image of page 1
HOW TO: Adding Map code (v2) to your Project 1. Download and configure the Google Play services SDK. The Google Maps Android API is distributed as part of this SDK. (DONE BEFORE) 2. Obtain an API key . To do this, you will need to register a project in the Google APIs Console, and get a signing certificate for your app. 3. Setup your Project to say it is using the GooglePlay Services 4. Specify settings in the Application Manifest. Add a map to a new or existing Android project.
Image of page 2
HOW to create app using Google Maps Follow for latest details n/android/start#install_and_configure_the_google _play_services_sdk
Image of page 3
Next register your app for Google API key & add map code See next example Need to register your app (pacakgename.app) in google console to use maps to get api key Update your Android project (typically manifest file) to contain this new api key Add MapFragment (or other related class) to display and configure a Google map.
Image of page 4
Step by Step with Android Studio App using Maps
Image of page 5
STEP 1: Install Google Play Services FOLLOW DIRECTIONS ON developer.android.com - --it can change so I am not going to teach this in class you read and follow instructions. To learn how to install the package, see Installing the Maps API SDK . See specifically - services/setup.html#Setup
Image of page 6
STEP 2: Setting up a Project to use Google Play Services Unfortunately pretty manual process STEP 2.1 Open the build.gradle file inside your application module directory. Note: Android Studio projects contain a top- level build.gradle file and a build.gradle file for each module. Be sure to edit the file for your application module. See Building Your Project with Gradle for more information about Gradle. Add a new build rule under dependencies for the latest version of play-services. For example:| apply plugin: 'com.android.application' ... dependencies { compile 'com.android.support:appcompat-v7:21.0.3' compile 'com.google.android.gms:play-services:6.5.87' } Be sure you update this version number each time Google Play services is updated. If you don’t know the correct play service version you installed --- look at C:\Users\**\AppData\Local\Android\sdk\extras\google\m 2repository\com\google\android\gms\play-services
Image of page 7
STEP 2.1: continued Save the changes and click Sync Project with Gradle Files in the toolbar.
Image of page 8
STEP 2.2 : Add google Play services VERSION to the manifest file Edit your application's AndroidManifest.xml file, and add the following declaration within the <application> element. This embeds the version of Google Play services that the app was compiled with. <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
Image of page 9
STEP 3: Get an API Key you have to add a Maps API key to your application.
Image of page 10
Image of page 11

You've reached the end of your free preview.

Want to read all 56 pages?

  • Fall '12
  • JoshuaO'Connor
  • Google Maps, Google Maps Android, Maps Android API

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture