To create google map in your android You should do these following steps.
STEP 1:- create your activity
This is sample example:-
public class GooglemapActivity extends MapActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
MapView mMapView;
mMapView = (MapView) findViewById(R.id.mapview);
mMapView.setBuiltInZoomControls(true);
}
@Override
protected boolean isRouteDisplayed() {
// TODO Auto-generated method stub
return false;
}
}
STEP 2:- create googlemap in your main.xml file
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:apiKey="your google map key"
/>
STEP 3:- make some entries in your android.menifest
these are:-
(a) Add the following as a child of the <application> element:
<uses-library android:name="com.google.android.maps" />
(b) add the following as a child of the <manifest> element:
<uses-permission android:name="android.permission.INTERNET" />
STEP 3:- make your debug.keystore key
for windows users we have our default debug.keystore in C:\Documents and Settings\user\.android
(a) open your command prompt and run command
cd C:\Documents and Settings\user\.android
(b) then run this command
keytool -list -keystore debug.keystore
it will ask for password then enter password : android
(c) It will generate a key, note this key for future use.
STEP 4:- register your application with google, please visit this link:- http://code.google.com/android/maps-api-signup.html
(a) accept terms and conditions, enter your key which is generated on command prompt
(b) Press Generate API key
(c) It will generate an API key, use this key in your application xml.
STEP 5:- CLEAN AND BUILD YOUR PROJECT , IT WILL SHOW YOU GOOGLE MAP.
I hope this will help you alot, BEST OF LUCK.
Note:- If any query then feel free to ask me anytime @ kuntal.pushpendra@gmail.com