Showing posts with label Generate Map Key. Show all posts
Showing posts with label Generate Map Key. Show all posts

Monday, 30 July 2012

Google map example in android

Android Google map and Google api key example
Hello Friends ,Here I am sharing the full tutorial of How to implements Google map
in your android application:

Step 1: Creating Key Store 


Open the command prompt and follow the steps

C:\Mukesh\Android-Sdk\tools>keytool -genkey -v -keystore projectkey.keystore -alias aliasname -keyalg RSA -keysize 2048 -validity 15000
Enter keystore password: ------------
What is your first and last name?
[Unknown]: ------------
What is the name of your 
organizational unit?
[Unknown]: ------------
What is the name of your organization?
[Unknown]: ------------
What is the name of your City or Locality?
[Unknown]: ------------
What is the name of your State or Province?
[Unknown]: ------------
What is the two-letter country code for this unit?
[Unknown]: ------------

Is CN=mukesh, OU=zss, O=zss, L=delhi, ST=delhi, C=dl correct?

[no]: yes

Generating 2,048 bit RSA key pair and self-signed certificate 

(SHA1withRSA) with a validity of 15,000 days

        for: CN=CN, OU=OU, O=O, L=L, ST=ST, C=C

Enter key password for <aliasname>

        (RETURN if same as keystore password): ------------

Re-enter new password: ------------

[Storing projectkey.keystore]
C:\Mukesh\Android-Sdk\tools>keytool -list -alias aliasname -keystore projectkey.keystore
Enter keystore password:
aliasname, Jul 22, 2012, PrivateKeyEntry,
Certificate fingerprint (MD5):
A2:69:37:23:5B:27:68:B0:B7:5E:C1:61:08:04:F8:C0



Step 2: Obtaining Google API key for Google Map:
                                            Using Certificate fingerprint(MD5) you can get your get your google 
API Key from this link:
                         http://code.google.com/android/maps-api-signup.html 


Finally you get this:
Your key is: 
0NmasjBqpEvFTVP4IugZrbssdsIKnwPH2qSpd8g

This key is good for all apps signed with your certificate whose fingerprint is:

A2:69:37:23:5B:27:68:B0:B7:5E:C1:61:08:04:F8:C0

Here is an example xml layout to get you started on your way to mapping glory:
              <com.google.android.maps.MapView
                 android:layout_width="fill_parent"
                 android:layout_height="fill_parent"
                 android:apiKey="0NmasjBqpEvFTVP4IugZrbssdsIKnwPH2qSpd8g"
                 />


Use the above xml code and Enjoy...:)
Please Comment me or Ask if you face any problem.

Sunday, 22 July 2012

Creating keystore and google api key for google maps-Android



Open the command prompt and follow the steps

C:\Mukesh\Android-Sdk\tools>keytool -genkey -v -keystore projectkey.keystore -alias aliasname -keyalg RSA -keysize 2048 -validity 15000
Enter keystore password: ------------
What is your first and last name?
[Unknown]: ------------
What is the name of your 
organizational unit?
[Unknown]: ------------
What is the name of your organization?
[Unknown]: ------------
What is the name of your City or Locality?
[Unknown]: ------------
What is the name of your State or Province?
[Unknown]: ------------
What is the two-letter country code for this unit?
[Unknown]: ------------

Is CN=mukesh, OU=zss, O=zss, L=delhi, ST=delhi, C=dl correct?

[no]: yes

Generating 2,048 bit RSA key pair and self-signed certificate 

(SHA1withRSA) with a validity of 15,000 days

        for: CN=CN, OU=OU, O=O, L=L, ST=ST, C=C

Enter key password for <aliasname>

        (RETURN if same as keystore password): ------------

Re-enter new password: ------------

[Storing projectkey.keystore]
C:\Mukesh\Android-Sdk\tools>keytool -list -alias aliasname -keystore projectkey.keystore
Enter keystore password:
aliasname, Jul 22, 2012, PrivateKeyEntry,
Certificate fingerprint (MD5):
A2:69:37:23:5B:27:68:B0:B7:5E:C1:61:08:04:F8:C0

Using your Certificate fingerprint (MD5) get google api key from this site

http://code.google.com/android/maps-api-signup.html

 

Copyright @ 2013 Android Developers Blog.