/Use Google Maps API on Your Android Application!

Use Google Maps API on Your Android Application!

 
This Article will show how to use Google Maps API on your Android Application in a simple way!
Before writing the code and start developing , First u have to Sign Up for the Android Maps API :
type this command on ur terminal : $ keytool -list -keystore ~/.android/debug.keystore

Then , the default password of the keystore is android
You will get ur MD5 , take it and type it here : http://bit.ly/rEzl6j

it will give u the key! … that’s all , let’s start Developing
When u start creating ur Project , choose Google APIs as a target
first , u have to make some changes on AndroidManifest.xml of your Application, to use Maps Library and Internet u have to type the Following :
<uses-library android:name=”com.google.android.maps”/>
<uses-permission android:name=”android.permission.INTERNET”/>
 
The Complete AndroidManifest.xml :



To Display the Maps , U have to modify main.xml File of ur Application . Use <com.google.android.maps.MapView /> to display the map .
main.xml :



To zoom the Maps in and out , u have to add some changes to main.xml :



The Complete main.xml file >>

Let’s go to our Activity  , MapsActivity.java :



Run ur Project as an Android Application >>

That’s All , Thanks!