SlideShare uma empresa Scribd logo
1 de 22
Baixar para ler offline
Using Google Maps V2 in
Android
Presented By Joseph Kandi
Email: joseph@peruzal.co.za
http://www.peruzal.co.za
Saturday 14 September 13
Take Aways
Create A New Project in Android Studio
Use SDK Manager to Download Required APIs
Add Google Play Services to Project
Add the MapFragment
Get the Android API Key
Add Required Permissions to AndroidManifest.xml file
Manipulate the Map Programmatically
Add Markers to the Map
Saturday 14 September 13
Create A New Project
Note: We are using the Google APIs
We will need the Package
name later
Saturday 14 September 13
Blank Activity
We want a blank project
Saturday 14 September 13
Change Activity Name
Change the Activity Name
Change the layout xml file name as well
Saturday 14 September 13
Download Required APIs
Launch SDK Manager
Install Google APIs
Install Google Repository
Install Google Play Services
Saturday 14 September 13
Install Required APIs
Install Google APIs
Install Support Repository
Install Google Play Services
Install Google Repository
Saturday 14 September 13
Add Google Play Services
Add the Google Play Services dependency to
gradle.build file
Gradle configuration file
Saturday 14 September 13
Getting the API Key
Sign Up on Google API Console
Create a New Project
Enable Google Android Maps V2
Use the keytool to get the SHA1 signing keys
Get the API key from Google API Console
Saturday 14 September 13
Add MapFragment
Add the Google Maps Fragment
Add fragment
Saturday 14 September 13
Declare Options for the
MapFragment
Add Schema to be able to add map
options
Add map options
Saturday 14 September 13
Create New Android Key
Create a new Android key
Enable Google Maps Android V2 under Services
Paste SHA1 key fingerprint here, follow the
example below
Saturday 14 September 13
Get SHA1 Hash with keytool
Change directory to the .android folder, its under
the Usersuser folder
Saturday 14 September 13
Troubleshoot if errors
The command might not be in the PATH
Saturday 14 September 13
Fix “Command Not Found”
Locate the keytool command, it’s installed the in
JDK bin folder
Saturday 14 September 13
Modify PATH environment
variable
Edit the PATH environment variable and add the
the location to the JDK bin folder
Choose PATH
Choose Edit
Saturday 14 September 13
Re-run keytool command
keytool command working now
Execute command to retrieve the
SHA1 fingerprint
Saturday 14 September 13
Get SHA1 Hash
Copy SHA1 fingerprint
Saturday 14 September 13
Complete Setup on Google API
Console
Paste the fingerprint
Saturday 14 September 13
Copy API Key
Get the API Key
Saturday 14 September 13
Add Required Permissions to
AndroidManifest.xml
Add the Key to the manifest file
Add permissions
Require OpenGL ES v2
Saturday 14 September 13
END
Shameless marketing : For more on Android Training
visit us at
http://www.peruzal.co.za
Saturday 14 September 13

Mais conteúdo relacionado

Destaque

Android MapView and MapActivity
Android MapView and MapActivityAndroid MapView and MapActivity
Android MapView and MapActivity
Ahsanul Karim
 
Lecture Slides for Location based Services [Android]
Lecture Slides for Location based Services [Android]Lecture Slides for Location based Services [Android]
Lecture Slides for Location based Services [Android]
Nehil Jain
 
android sqlite
android sqliteandroid sqlite
android sqlite
Deepa Rani
 

Destaque (15)

[Android] Google Service Play & Google Maps
[Android] Google Service Play & Google Maps[Android] Google Service Play & Google Maps
[Android] Google Service Play & Google Maps
 
Android MapView and MapActivity
Android MapView and MapActivityAndroid MapView and MapActivity
Android MapView and MapActivity
 
Android Project report on City Tourist Location based services (Shuja ul hassan)
Android Project report on City Tourist Location based services (Shuja ul hassan)Android Project report on City Tourist Location based services (Shuja ul hassan)
Android Project report on City Tourist Location based services (Shuja ul hassan)
 
Android application for gps
Android application for gpsAndroid application for gps
Android application for gps
 
Android Training (Storing data using SQLite)
Android Training (Storing data using SQLite)Android Training (Storing data using SQLite)
Android Training (Storing data using SQLite)
 
Sql lite android
Sql lite androidSql lite android
Sql lite android
 
Lecture Slides for Location based Services [Android]
Lecture Slides for Location based Services [Android]Lecture Slides for Location based Services [Android]
Lecture Slides for Location based Services [Android]
 
Android - Google Maps
Android - Google MapsAndroid - Google Maps
Android - Google Maps
 
android sqlite
android sqliteandroid sqlite
android sqlite
 
09.1. Android - Local Database (Sqlite)
09.1. Android - Local Database (Sqlite)09.1. Android - Local Database (Sqlite)
09.1. Android - Local Database (Sqlite)
 
Android development session 6 - Google Maps v2
Android development   session 6 - Google Maps v2Android development   session 6 - Google Maps v2
Android development session 6 - Google Maps v2
 
Location-Based Services on Android
Location-Based Services on AndroidLocation-Based Services on Android
Location-Based Services on Android
 
Google Maps in Android
Google Maps in AndroidGoogle Maps in Android
Google Maps in Android
 
Touchpoint Dashboard Journey Mapping Guide 2014
Touchpoint Dashboard Journey Mapping Guide 2014Touchpoint Dashboard Journey Mapping Guide 2014
Touchpoint Dashboard Journey Mapping Guide 2014
 
Android database tutorial
Android database tutorialAndroid database tutorial
Android database tutorial
 

Último

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Using Location and Google Maps v2 in Android Apps

  • 1. Using Google Maps V2 in Android Presented By Joseph Kandi Email: joseph@peruzal.co.za http://www.peruzal.co.za Saturday 14 September 13
  • 2. Take Aways Create A New Project in Android Studio Use SDK Manager to Download Required APIs Add Google Play Services to Project Add the MapFragment Get the Android API Key Add Required Permissions to AndroidManifest.xml file Manipulate the Map Programmatically Add Markers to the Map Saturday 14 September 13
  • 3. Create A New Project Note: We are using the Google APIs We will need the Package name later Saturday 14 September 13
  • 4. Blank Activity We want a blank project Saturday 14 September 13
  • 5. Change Activity Name Change the Activity Name Change the layout xml file name as well Saturday 14 September 13
  • 6. Download Required APIs Launch SDK Manager Install Google APIs Install Google Repository Install Google Play Services Saturday 14 September 13
  • 7. Install Required APIs Install Google APIs Install Support Repository Install Google Play Services Install Google Repository Saturday 14 September 13
  • 8. Add Google Play Services Add the Google Play Services dependency to gradle.build file Gradle configuration file Saturday 14 September 13
  • 9. Getting the API Key Sign Up on Google API Console Create a New Project Enable Google Android Maps V2 Use the keytool to get the SHA1 signing keys Get the API key from Google API Console Saturday 14 September 13
  • 10. Add MapFragment Add the Google Maps Fragment Add fragment Saturday 14 September 13
  • 11. Declare Options for the MapFragment Add Schema to be able to add map options Add map options Saturday 14 September 13
  • 12. Create New Android Key Create a new Android key Enable Google Maps Android V2 under Services Paste SHA1 key fingerprint here, follow the example below Saturday 14 September 13
  • 13. Get SHA1 Hash with keytool Change directory to the .android folder, its under the Usersuser folder Saturday 14 September 13
  • 14. Troubleshoot if errors The command might not be in the PATH Saturday 14 September 13
  • 15. Fix “Command Not Found” Locate the keytool command, it’s installed the in JDK bin folder Saturday 14 September 13
  • 16. Modify PATH environment variable Edit the PATH environment variable and add the the location to the JDK bin folder Choose PATH Choose Edit Saturday 14 September 13
  • 17. Re-run keytool command keytool command working now Execute command to retrieve the SHA1 fingerprint Saturday 14 September 13
  • 18. Get SHA1 Hash Copy SHA1 fingerprint Saturday 14 September 13
  • 19. Complete Setup on Google API Console Paste the fingerprint Saturday 14 September 13
  • 20. Copy API Key Get the API Key Saturday 14 September 13
  • 21. Add Required Permissions to AndroidManifest.xml Add the Key to the manifest file Add permissions Require OpenGL ES v2 Saturday 14 September 13
  • 22. END Shameless marketing : For more on Android Training visit us at http://www.peruzal.co.za Saturday 14 September 13