Reputation: 1332
Hi At that time working on google map. I want to display map in my activity. I successfully display the map view. But i cant show the map i think i have wrong api key so how can i get api key of google map. I create the keystore and all procedure but i didn't have idea how to get api key from this keystore.
I also give the all permission in manifest file and also add the google map library than also i cant show the map.in activity also extends mapactivity and also write code fro map in xml.
If anyone knows about that please tell me.
Upvotes: 8
Views: 88037
Reputation: 28865
See http://hmkcode.com/getting-android-google-maps-v2-api-key/.
Upvotes: 0
Reputation: 1418
I faced the same problem and my issue was I used debug certificate not release certificate
if you use this for release certificate "not debug certificate":
Enter the following at a terminal or command prompt:
keytool -list -v -keystore your_keystore_name -alias your_alias_name
in your_keystore_name write the path for the file you used for signed api which its extension .jks
take the sha1 which you will get in the output and used it to get the key.
Upvotes: 1
Reputation: 15358
You are trying to use google map of api v1
which is already deprecated
as stated here
so you can't generate new api key if your existing api key is wrong.so kindly move towards google map of api v2
Upvotes: 0
Reputation: 133560
If you already have the key got the link below and add the fingerprint along with your android project package name
You also need to login to your google account
https://code.google.com/apis/console
Click on create new key. Add the fingerprint along with your android project package name.
You can see the api key above
Enable google map api v2 from services tab.
Then in manifest file under application tag
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="my key"/>
Upvotes: 17
Reputation: 1967
serverAddress = new URL("http://maps.google.com/maps/geo?q="
+ Double.toString(loc.getLatitude()) + ","
+ Double.toString(loc.getLongitude())
+ "&output=xml&oe=utf8&sensor=true&key="
+ R.string.GOOGLE_MAPS_API_KEY);
Where GOOGLE_MAPS_API_KEYS is a string in string.xml containing your maps api key
Upvotes: 1
Reputation: 1990
Visit the API Console
Login with your Google acocunt and click the API Access tab. Your API key is listed there.
You will also need to enable Google Maps Android API v2 service for your API key. You can do that on the services tab via the toggle button.
Upvotes: 2