SlideShare a Scribd company logo
1 of 19
12. Map
Oum Saokosal
Master of Engineering in Information Systems, South Korea
855-12-252-752
oum_saokosal@yahoo.com
Map
• Google owns Android, so it is obvious that
the map you're going to use in Android
app must be Google Map.
• However to use Google Map in your app
is not as easy as it should be.
Instruction how to make Map app:
1. Go to window menu -> Android SDK Manager
-> Download Google API (2.3.3 API 10)
2. Create AVD Targeting
Google API:
For this map app, you
need to create an AVD
targeting Google API. In
this case, please choose
API level 10 for 2.3.3.
3. Android Manifest: Add Google Maps Library
<application …>
<uses-library android:name="com.google.android.maps" />
<activity…>
...
</application>
4. Android Manifest: Add Internet Permission
<manifest …>
<uses-sdk android:minSdkVersion="10" />
<uses-permission
android:name="android.permission.INTERNET"/>
...
...
</manifest>
AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.kosalab"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="10" />
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<uses-library android:name="com.google.android.maps" />
<activity
android:label="@string/app_name"
android:name=".GoogleMapActivity" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
5. main.xml: replace with this codes
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mymap"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:apiKey="Enter Your API Key"
/>
6. Getting API Key:
6.1. Go to a website, http://code.google.com/android/add-
ons/google-apis
6.2. Click on Maps API Key Signup
6.3. Enter your MD5 fingerprint. (Scroll down a bit)
6.4. To get MD5 fingerprint
6.4.1. In Eclipse, go to Window -> Preferences -> Android ->
Build -> Default debug keystore -> Copy the path
6.4.2. In Windows Explorer, go to Java installed
folder, e.g. c:Program Files (x86)Java -> jre6 ->
bin -> keystore.exe
• 6.4.3. After you found out keystore.exe, open
cmd, and then go to folder where keystore
located.
• 6.4.4. Type a command line
keytool -list -alias androiddebugkey -keystore
"C:Userskosal.androiddebug.keystore" -storepass
android -keypass android
-> Copy the PrivateKey
• 6.4.5. Paste the PrivateKey into MD5 Fingerprint
in the website -> Click "Generate API Key"
6.4.6. Finally, you will get your API key:
7. Enter the API key into main.xml.
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mymap"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:apiKey="eNtEr_y0uR_Ap1_kEy_HeRe"
/>
8. In Java, you must extends MapActivity instead of Activity:
package com.kosalab;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import android.os.Bundle;
public class GoogleMapActivity extends MapActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
MapView mapView = (MapView) findViewById(R.id.mymap);
mapView.setBuiltInZoomControls(true);
}
@Override
protected boolean isRouteDisplayed() {
// TODO Auto-generated method stub
return false;
}
}
• Run the App with the AVD targeting Google API
You know what, you have
reached the end of this course!
Thank You Very Much
Good Luck!
From Prof. Oum Saokosal
On Feb 1, 2012

More Related Content

What's hot

android activity
android activityandroid activity
android activityDeepa Rani
 
Firebase on Android: The Big Picture
Firebase on Android: The Big PictureFirebase on Android: The Big Picture
Firebase on Android: The Big PictureSriyank Siddhartha
 
Introduction to Android and Android Studio
Introduction to Android and Android StudioIntroduction to Android and Android Studio
Introduction to Android and Android StudioSuyash Srijan
 
Android gps, location services, camera and sensors - Paramvir Singh
Android gps, location services, camera and sensors - Paramvir SinghAndroid gps, location services, camera and sensors - Paramvir Singh
Android gps, location services, camera and sensors - Paramvir SinghParamvir Singh
 
Introduction to mobile application development
Introduction to mobile application developmentIntroduction to mobile application development
Introduction to mobile application developmentChandan Maurya
 
Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]Aaron Gustafson
 
Android Development - ConstraintLayout
Android Development - ConstraintLayoutAndroid Development - ConstraintLayout
Android Development - ConstraintLayoutManuel Vicente Vivo
 
Location-Based Services on Android
Location-Based Services on AndroidLocation-Based Services on Android
Location-Based Services on AndroidJomar Tigcal
 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API07.pallav
 
Jetpack Navigation Component
Jetpack Navigation ComponentJetpack Navigation Component
Jetpack Navigation ComponentJames Shvarts
 
Introduction to Kotlin Language and its application to Android platform
Introduction to Kotlin Language and its application to Android platformIntroduction to Kotlin Language and its application to Android platform
Introduction to Kotlin Language and its application to Android platformEastBanc Tachnologies
 
Android share preferences
Android share preferencesAndroid share preferences
Android share preferencesAjay Panchal
 
Android application structure
Android application structureAndroid application structure
Android application structureAlexey Ustenko
 
Android Navigation Component
Android Navigation ComponentAndroid Navigation Component
Android Navigation ComponentŁukasz Ciupa
 
Layouts in android
Layouts in androidLayouts in android
Layouts in androidDurai S
 
iOS Coding Best Practices
iOS Coding Best PracticesiOS Coding Best Practices
iOS Coding Best PracticesJean-Luc David
 
The New JavaScript: ES6
The New JavaScript: ES6The New JavaScript: ES6
The New JavaScript: ES6Rob Eisenberg
 
Android development session 5 - Debug android studio
Android development   session 5 - Debug android studioAndroid development   session 5 - Debug android studio
Android development session 5 - Debug android studioFarabi Technology Middle East
 

What's hot (20)

Android - Android Geocoding and Location based Services
Android - Android Geocoding and Location based ServicesAndroid - Android Geocoding and Location based Services
Android - Android Geocoding and Location based Services
 
android activity
android activityandroid activity
android activity
 
Firebase on Android: The Big Picture
Firebase on Android: The Big PictureFirebase on Android: The Big Picture
Firebase on Android: The Big Picture
 
Introduction to Android and Android Studio
Introduction to Android and Android StudioIntroduction to Android and Android Studio
Introduction to Android and Android Studio
 
Android gps, location services, camera and sensors - Paramvir Singh
Android gps, location services, camera and sensors - Paramvir SinghAndroid gps, location services, camera and sensors - Paramvir Singh
Android gps, location services, camera and sensors - Paramvir Singh
 
Introduction to mobile application development
Introduction to mobile application developmentIntroduction to mobile application development
Introduction to mobile application development
 
Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]
 
Android Development - ConstraintLayout
Android Development - ConstraintLayoutAndroid Development - ConstraintLayout
Android Development - ConstraintLayout
 
Location-Based Services on Android
Location-Based Services on AndroidLocation-Based Services on Android
Location-Based Services on Android
 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API
 
Jetpack Navigation Component
Jetpack Navigation ComponentJetpack Navigation Component
Jetpack Navigation Component
 
Introduction to Kotlin Language and its application to Android platform
Introduction to Kotlin Language and its application to Android platformIntroduction to Kotlin Language and its application to Android platform
Introduction to Kotlin Language and its application to Android platform
 
Android share preferences
Android share preferencesAndroid share preferences
Android share preferences
 
Android application structure
Android application structureAndroid application structure
Android application structure
 
Android Navigation Component
Android Navigation ComponentAndroid Navigation Component
Android Navigation Component
 
Layouts in android
Layouts in androidLayouts in android
Layouts in android
 
Android Basic Components
Android Basic ComponentsAndroid Basic Components
Android Basic Components
 
iOS Coding Best Practices
iOS Coding Best PracticesiOS Coding Best Practices
iOS Coding Best Practices
 
The New JavaScript: ES6
The New JavaScript: ES6The New JavaScript: ES6
The New JavaScript: ES6
 
Android development session 5 - Debug android studio
Android development   session 5 - Debug android studioAndroid development   session 5 - Debug android studio
Android development session 5 - Debug android studio
 

Viewers also liked

How to Get Benefit from Google Maps
How to Get Benefit from Google MapsHow to Get Benefit from Google Maps
How to Get Benefit from Google MapsChamnan Muon
 
Google Map Presentation Final
Google Map Presentation FinalGoogle Map Presentation Final
Google Map Presentation FinalFrances O'Neill
 
07.4. Android Basic Simple Browser (WebView)
07.4. Android Basic Simple Browser (WebView)07.4. Android Basic Simple Browser (WebView)
07.4. Android Basic Simple Browser (WebView)Oum Saokosal
 
10.1. Android Audio
10.1. Android Audio10.1. Android Audio
10.1. Android AudioOum Saokosal
 
07.3. Android Alert message, List, Dropdown, and Auto Complete
07.3. Android Alert message, List, Dropdown, and Auto Complete07.3. Android Alert message, List, Dropdown, and Auto Complete
07.3. Android Alert message, List, Dropdown, and Auto CompleteOum Saokosal
 
11.1 Android with HTML
11.1 Android with HTML11.1 Android with HTML
11.1 Android with HTMLOum Saokosal
 
06. Android Basic Widget and Container
06. Android Basic Widget and Container06. Android Basic Widget and Container
06. Android Basic Widget and ContainerOum Saokosal
 
10.3 Android Video
10.3 Android Video10.3 Android Video
10.3 Android VideoOum Saokosal
 
04. Review OOP with Java
04. Review OOP with Java04. Review OOP with Java
04. Review OOP with JavaOum Saokosal
 
Using intents in android
Using intents in androidUsing intents in android
Using intents in androidOum Saokosal
 
08.1. Android How to Use Intent (explicit)
08.1. Android How to Use Intent (explicit)08.1. Android How to Use Intent (explicit)
08.1. Android How to Use Intent (explicit)Oum Saokosal
 
Java Programming - Polymorphism
Java Programming - PolymorphismJava Programming - Polymorphism
Java Programming - PolymorphismOum Saokosal
 
Objected-Oriented Programming with Java
Objected-Oriented Programming with JavaObjected-Oriented Programming with Java
Objected-Oriented Programming with JavaOum Saokosal
 
Android Studio - Tips, Tricks & little known features
Android Studio - Tips, Tricks & little known features Android Studio - Tips, Tricks & little known features
Android Studio - Tips, Tricks & little known features Andraž Pajtler
 
07.1. Android Even Handling
07.1. Android Even Handling07.1. Android Even Handling
07.1. Android Even HandlingOum Saokosal
 
10.2 Android Audio with SD Card
10.2 Android Audio with SD Card10.2 Android Audio with SD Card
10.2 Android Audio with SD CardOum Saokosal
 
Java Programming - Introduction to Abstract Class
Java Programming - Introduction to Abstract ClassJava Programming - Introduction to Abstract Class
Java Programming - Introduction to Abstract ClassOum Saokosal
 
Java Programming - Inheritance
Java Programming - InheritanceJava Programming - Inheritance
Java Programming - InheritanceOum Saokosal
 

Viewers also liked (20)

Intro To Google Maps
Intro To Google MapsIntro To Google Maps
Intro To Google Maps
 
How to Get Benefit from Google Maps
How to Get Benefit from Google MapsHow to Get Benefit from Google Maps
How to Get Benefit from Google Maps
 
Google Map Presentation Final
Google Map Presentation FinalGoogle Map Presentation Final
Google Map Presentation Final
 
07.4. Android Basic Simple Browser (WebView)
07.4. Android Basic Simple Browser (WebView)07.4. Android Basic Simple Browser (WebView)
07.4. Android Basic Simple Browser (WebView)
 
10.1. Android Audio
10.1. Android Audio10.1. Android Audio
10.1. Android Audio
 
07.3. Android Alert message, List, Dropdown, and Auto Complete
07.3. Android Alert message, List, Dropdown, and Auto Complete07.3. Android Alert message, List, Dropdown, and Auto Complete
07.3. Android Alert message, List, Dropdown, and Auto Complete
 
11.1 Android with HTML
11.1 Android with HTML11.1 Android with HTML
11.1 Android with HTML
 
06. Android Basic Widget and Container
06. Android Basic Widget and Container06. Android Basic Widget and Container
06. Android Basic Widget and Container
 
10.3 Android Video
10.3 Android Video10.3 Android Video
10.3 Android Video
 
04. Review OOP with Java
04. Review OOP with Java04. Review OOP with Java
04. Review OOP with Java
 
Using intents in android
Using intents in androidUsing intents in android
Using intents in android
 
08.1. Android How to Use Intent (explicit)
08.1. Android How to Use Intent (explicit)08.1. Android How to Use Intent (explicit)
08.1. Android How to Use Intent (explicit)
 
Java Programming - Polymorphism
Java Programming - PolymorphismJava Programming - Polymorphism
Java Programming - Polymorphism
 
Objected-Oriented Programming with Java
Objected-Oriented Programming with JavaObjected-Oriented Programming with Java
Objected-Oriented Programming with Java
 
Android Studio - Tips, Tricks & little known features
Android Studio - Tips, Tricks & little known features Android Studio - Tips, Tricks & little known features
Android Studio - Tips, Tricks & little known features
 
INSTALACIÓN ANDROID STUDIO 1
INSTALACIÓN ANDROID STUDIO 1INSTALACIÓN ANDROID STUDIO 1
INSTALACIÓN ANDROID STUDIO 1
 
07.1. Android Even Handling
07.1. Android Even Handling07.1. Android Even Handling
07.1. Android Even Handling
 
10.2 Android Audio with SD Card
10.2 Android Audio with SD Card10.2 Android Audio with SD Card
10.2 Android Audio with SD Card
 
Java Programming - Introduction to Abstract Class
Java Programming - Introduction to Abstract ClassJava Programming - Introduction to Abstract Class
Java Programming - Introduction to Abstract Class
 
Java Programming - Inheritance
Java Programming - InheritanceJava Programming - Inheritance
Java Programming - Inheritance
 

Similar to 12. Android Basic Google Map

Android tutorial
Android tutorialAndroid tutorial
Android tutorialDanish_k
 
Android tutorial ppt
Android tutorial pptAndroid tutorial ppt
Android tutorial pptRehna Renu
 
Mobile application and Game development
Mobile application and Game developmentMobile application and Game development
Mobile application and Game developmentWomen In Digital
 
Module-I_Introduction-to-Android.pptx
Module-I_Introduction-to-Android.pptxModule-I_Introduction-to-Android.pptx
Module-I_Introduction-to-Android.pptxlancelotlaytan1996
 
Android Workshop
Android WorkshopAndroid Workshop
Android WorkshopJunda Ong
 
How to create android applications
How to create android applicationsHow to create android applications
How to create android applicationsTOPS Technologies
 
Android studio
Android studioAndroid studio
Android studioAndri Yabu
 
Android chapter02-setup1-sdk
Android chapter02-setup1-sdkAndroid chapter02-setup1-sdk
Android chapter02-setup1-sdkTran Le Hoan
 
Android Development Primer - GDG Los Angeles
Android Development Primer - GDG Los AngelesAndroid Development Primer - GDG Los Angeles
Android Development Primer - GDG Los AngelesGerard
 
android level 3
android level 3android level 3
android level 3DevMix
 
Android App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureAndroid App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureVijay Rastogi
 
Android Programing Course Material Labs
Android Programing Course Material LabsAndroid Programing Course Material Labs
Android Programing Course Material LabsShady Selim
 

Similar to 12. Android Basic Google Map (20)

Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Android tutorial ppt
Android tutorial pptAndroid tutorial ppt
Android tutorial ppt
 
Mobile application and Game development
Mobile application and Game developmentMobile application and Game development
Mobile application and Game development
 
Module-I_Introduction-to-Android.pptx
Module-I_Introduction-to-Android.pptxModule-I_Introduction-to-Android.pptx
Module-I_Introduction-to-Android.pptx
 
Android Workshop
Android WorkshopAndroid Workshop
Android Workshop
 
Android tutorial1
Android tutorial1Android tutorial1
Android tutorial1
 
Android development beginners faq
Android development  beginners faqAndroid development  beginners faq
Android development beginners faq
 
How to create android applications
How to create android applicationsHow to create android applications
How to create android applications
 
Android studio
Android studioAndroid studio
Android studio
 
Android
Android Android
Android
 
Android chapter02-setup1-sdk
Android chapter02-setup1-sdkAndroid chapter02-setup1-sdk
Android chapter02-setup1-sdk
 
Android Development Primer - GDG Los Angeles
Android Development Primer - GDG Los AngelesAndroid Development Primer - GDG Los Angeles
Android Development Primer - GDG Los Angeles
 
APPIUM
APPIUMAPPIUM
APPIUM
 
android level 3
android level 3android level 3
android level 3
 
Android App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureAndroid App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structure
 
Notes Unit2.pptx
Notes Unit2.pptxNotes Unit2.pptx
Notes Unit2.pptx
 
Synapseindia android apps application
Synapseindia android apps applicationSynapseindia android apps application
Synapseindia android apps application
 
Android Programing Course Material Labs
Android Programing Course Material LabsAndroid Programing Course Material Labs
Android Programing Course Material Labs
 

More from Oum Saokosal

Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFOum Saokosal
 
Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Oum Saokosal
 
Database Concept - ERD Mapping to MS Access
Database Concept - ERD Mapping to MS AccessDatabase Concept - ERD Mapping to MS Access
Database Concept - ERD Mapping to MS AccessOum Saokosal
 
Java Programming - Abstract Class and Interface
Java Programming - Abstract Class and InterfaceJava Programming - Abstract Class and Interface
Java Programming - Abstract Class and InterfaceOum Saokosal
 
09.1. Android - Local Database (Sqlite)
09.1. Android - Local Database (Sqlite)09.1. Android - Local Database (Sqlite)
09.1. Android - Local Database (Sqlite)Oum Saokosal
 
More on Application Structure
More on Application StructureMore on Application Structure
More on Application StructureOum Saokosal
 
Basic Understanding of Android XML
Basic Understanding of Android XMLBasic Understanding of Android XML
Basic Understanding of Android XMLOum Saokosal
 
02.1 - Getting Started with Android
02.1 - Getting Started with Android02.1 - Getting Started with Android
02.1 - Getting Started with AndroidOum Saokosal
 
Introduction to Android
Introduction to AndroidIntroduction to Android
Introduction to AndroidOum Saokosal
 
Android - Introduction
Android - IntroductionAndroid - Introduction
Android - IntroductionOum Saokosal
 

More from Oum Saokosal (10)

Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
 
Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)
 
Database Concept - ERD Mapping to MS Access
Database Concept - ERD Mapping to MS AccessDatabase Concept - ERD Mapping to MS Access
Database Concept - ERD Mapping to MS Access
 
Java Programming - Abstract Class and Interface
Java Programming - Abstract Class and InterfaceJava Programming - Abstract Class and Interface
Java Programming - Abstract Class and Interface
 
09.1. Android - Local Database (Sqlite)
09.1. Android - Local Database (Sqlite)09.1. Android - Local Database (Sqlite)
09.1. Android - Local Database (Sqlite)
 
More on Application Structure
More on Application StructureMore on Application Structure
More on Application Structure
 
Basic Understanding of Android XML
Basic Understanding of Android XMLBasic Understanding of Android XML
Basic Understanding of Android XML
 
02.1 - Getting Started with Android
02.1 - Getting Started with Android02.1 - Getting Started with Android
02.1 - Getting Started with Android
 
Introduction to Android
Introduction to AndroidIntroduction to Android
Introduction to Android
 
Android - Introduction
Android - IntroductionAndroid - Introduction
Android - Introduction
 

Recently uploaded

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 

Recently uploaded (20)

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 

12. Android Basic Google Map

  • 1. 12. Map Oum Saokosal Master of Engineering in Information Systems, South Korea 855-12-252-752 oum_saokosal@yahoo.com
  • 2. Map • Google owns Android, so it is obvious that the map you're going to use in Android app must be Google Map. • However to use Google Map in your app is not as easy as it should be.
  • 3. Instruction how to make Map app: 1. Go to window menu -> Android SDK Manager -> Download Google API (2.3.3 API 10)
  • 4. 2. Create AVD Targeting Google API: For this map app, you need to create an AVD targeting Google API. In this case, please choose API level 10 for 2.3.3.
  • 5. 3. Android Manifest: Add Google Maps Library <application …> <uses-library android:name="com.google.android.maps" /> <activity…> ... </application> 4. Android Manifest: Add Internet Permission <manifest …> <uses-sdk android:minSdkVersion="10" /> <uses-permission android:name="android.permission.INTERNET"/> ... ... </manifest>
  • 6. AndroidManifest.xml: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.kosalab" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="10" /> <uses-permission android:name="android.permission.INTERNET"/> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <uses-library android:name="com.google.android.maps" /> <activity android:label="@string/app_name" android:name=".GoogleMapActivity" > <intent-filter > <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
  • 7. 5. main.xml: replace with this codes <?xml version="1.0" encoding="utf-8"?> <com.google.android.maps.MapView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/mymap" android:layout_width="fill_parent" android:layout_height="fill_parent" android:clickable="true" android:apiKey="Enter Your API Key" />
  • 8. 6. Getting API Key: 6.1. Go to a website, http://code.google.com/android/add- ons/google-apis 6.2. Click on Maps API Key Signup
  • 9. 6.3. Enter your MD5 fingerprint. (Scroll down a bit)
  • 10. 6.4. To get MD5 fingerprint 6.4.1. In Eclipse, go to Window -> Preferences -> Android -> Build -> Default debug keystore -> Copy the path
  • 11. 6.4.2. In Windows Explorer, go to Java installed folder, e.g. c:Program Files (x86)Java -> jre6 -> bin -> keystore.exe
  • 12. • 6.4.3. After you found out keystore.exe, open cmd, and then go to folder where keystore located.
  • 13. • 6.4.4. Type a command line keytool -list -alias androiddebugkey -keystore "C:Userskosal.androiddebug.keystore" -storepass android -keypass android -> Copy the PrivateKey
  • 14. • 6.4.5. Paste the PrivateKey into MD5 Fingerprint in the website -> Click "Generate API Key"
  • 15. 6.4.6. Finally, you will get your API key:
  • 16. 7. Enter the API key into main.xml. <?xml version="1.0" encoding="utf-8"?> <com.google.android.maps.MapView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/mymap" android:layout_width="fill_parent" android:layout_height="fill_parent" android:clickable="true" android:apiKey="eNtEr_y0uR_Ap1_kEy_HeRe" />
  • 17. 8. In Java, you must extends MapActivity instead of Activity: package com.kosalab; import com.google.android.maps.MapActivity; import com.google.android.maps.MapView; import android.os.Bundle; public class GoogleMapActivity extends MapActivity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); MapView mapView = (MapView) findViewById(R.id.mymap); mapView.setBuiltInZoomControls(true); } @Override protected boolean isRouteDisplayed() { // TODO Auto-generated method stub return false; } }
  • 18. • Run the App with the AVD targeting Google API
  • 19. You know what, you have reached the end of this course! Thank You Very Much Good Luck! From Prof. Oum Saokosal On Feb 1, 2012