Post on 19-May-2015
description
Using Google Maps V2 in Android
Presented By Joseph KandiEmail: joseph@peruzal.co.zahttp://www.peruzal.co.za
Saturday 14 September 13
Take AwaysCreate 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 Users\user 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 commandkeytool 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 permissionsRequire OpenGL ES v2
Saturday 14 September 13
ENDShameless marketing : For more on Android Training
visit us at
http://www.peruzal.co.za
Saturday 14 September 13