Monday, November 22, 2010

Google maps API with Android

Hi,
As every one expected google Maps API can be used even in Android. To do this, we should follow few steps.
1) Sign your application as we do for all android applications
2) Generate MD5 fingerprint key using java keytool
3) Using the MD5 fingerprint key generate google maps key at http://code.google.com/android/maps-api-signup.html
4) Use the maps View object, generated in the last step, in Android layout xml
5) Add uses library "com.google.android.maps" inside the manifest under Application tag
6) Add permissions for "android.permission.INTERNET" and "android.permission.ACCESS_COARSE_LOCATION", "android.permission.ACCESS_FINE_LOCATION" under manifest tag.
7)Extend the MapActivity class and update maps  view object in UI side

I know these steps would not be giving you complete details on how to do it. So in my next post i will explain them in detail. If you can't stop yourself until then, you can proceed with it by refering the following sites.

http://code.google.com/android/add-ons/google-apis/maps-overview.html
http://code.google.com/android/add-ons/google-apis/mapkey.html

All the very best. Happy coding :)