The slides were presented as part of the Cape Town Android App Development training on how to use the Google Maps v2 in Android Apps with Android Studio.
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
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
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
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
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