1 / 9

Google Maps (1)

Google Maps (1). Chien -Chung Shen CIS, UD cshen@cis.udel.edu. About Google Maps API v1. From https://developers.google.com/maps/documentation/android/v1/hello- mapview :

shanna
Download Presentation

Google Maps (1)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Google Maps (1) Chien-Chung Shen CIS, UD cshen@cis.udel.edu

  2. About Google Maps API v1 • From https://developers.google.com/maps/documentation/android/v1/hello-mapview: “Version 1 of the Google Maps Android API has been officially deprecated as of December 3rd, 2012. This means that from March 18th, 2013 you will no longer be able to request an API key for this version. No new features will be added to Google Maps Android API v1. However, apps using v1 will continue to work on devices. Existing and new developers are encouraged to use Google Maps Android API v2.”

  3. Add Google Play Services (1) • Open Android SDK Manager and install Extras>Google Play services • Downloaded to <ADT-path>/sdk/extras/google/google_play_services

  4. Add Google Play Services (2) • Add Google Play Services as an Android library project: select File >Import > Android > Existing Android Code into Workspace and enter <ADT-path>/extras/google/google_play_services/libproject/google-play-services_lib, and click Finish • Define library dependency by adding android.library.reference.1=../google-play-services_lib into file project.properties • Select Project > Properties, select Java Build Path, and navigate to Libraries • Select Add External Jars, highlight the following jar file, and click Open: <ADT-path>/extras/android/support/v4/android-support-v4.jar

  5. Get Google Map Key (1) • To useGoogle Maps, we need a valid Google Maps API key • Get the key via Google APIs Console with • application signature key (SHA-1) • application package name • Use the Android debug key (~/.android/debug.keystore) to create the signature (SHA-1) keyby running keytool-list -v -alias androiddebugkey –keystoredebug.keystore -storepass android -keypass android

  6. Get Google Map Key (2) • Register with Google APIs Console • Activate “Google Maps Android API v2”

  7. Get Google Map Key (3) • Create API key by clicking “API Access” • Click on “Create new Android key”

  8. Get Google Map Key (4) • Enter SHA-1 fingerprint and the application package name separated by a semicolon (;) and click Create to get the API key

  9. AndroidManifest.xmlFile • Insert API key into AndroidManifest.xml <meta-data android:name="com.google.android.maps.v2.API_KEY"android:value="your_apikey" />

More Related