Organizational Research By

Surprising Reserch Topic

map api v2 authorisation failure using -'android,android-maps,google-maps-api-2'

map api v2 authorisation failure  using -'android,android-maps,google-maps-api-2'

Alright, here is what I did using the example

Got the debug key via keytool (made sure it is the the debug key is used by eclipse in Preferences -> Android -> Build)
Generated the key by the command

$ keytool -list -v -keystore debug.keystore -alias androiddebugkey -storepass android -keypass android
Copy pasted the SHA1 sum in the Google API Console + my packagename:

Enabled Google Map API v2 in the same project in Google API Console
Copied  it to the Manifest application in meta-data.
Downloaded via SDK manager and Imported the google-play-services_lib project and referenced it as the library project. As well as the ActionBarSherlock.
Before launching I make sure the GooglePlayServices are available.




<uses-permission android:name=""/>
<uses-permission android:name=""/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>



The proguard stuff are added too, but I don't obfuscate right now.

DrugstoresMapActivity extends SherlockFragmentActivity

<?xml version="1.0" encoding="utf-8"?>




The ActionBarSherlock has android-support-v4 in libs, not the main project if that matters.

The StartupActivity makes sure that DrugstoresMapActivity will be launched only if the services available

private void attempt() {
    int result = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getBaseContext());

    switch (result) {
        case ConnectionResult.SUCCESS:
            startActivity(new Intent(this, DrugstoresMapActivity.class));

            GooglePlayServicesUtil.getErrorDialog(result, this, REQUEST_DIALOG)

Double-checked the keys are fine.
No clue what I missed here.

asked Sep 7, 2015 by rajesh
0 votes

Related Hot Questions

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.