3

Im trying to implement Google-Places-API. I generated an API-Key as described here by copy/pasting the SHA1-Fingerprint from my "debug.keystore" into the corresponding field in credentials.

As the Projectname i used the value of "applicationId" from my build.gradle.

Now I am trying to use AutoComplete from the API like:

Intent intent = new PlaceAutocomplete.IntentBuilder(PlaceAutocomplete.MODE_OVERLAY).build(getTurActivity());
        startActivityForResult(intent, PLACE_AUTOCOMPLETE_REQUEST_CODE);

When I print out the status in onActivityResult i get the Status (see title) and the Status-Code: 9003

I am aware that this post exists but It didn't solve my problem. I checked my credentials and the API key, and everything seems to be just fine.

In my manifest file i set the API key inside application like this:

<meta-data
        android:name="com.google.android.geo.API_KEY"
        android:value="AIz*********....***"/>
Community
  • 1
  • 1
Vic Torious
  • 1,757
  • 3
  • 21
  • 24

1 Answers1

0

Okay, after a lot of testing and googleing I got it to work - but I am still confused:

I found this post and gave it a try, although I didn't believe it would help. When I got to my Module-Settings the only thing i did was to copy the Application Id without changing it (the exact same one, that I already copy/pasted from my build.gradle btw) and pasted it into field in the Developer Console. After that, it just worked.

I am quite certain that I already had used this exact same Application Id without success and i know I did everything that was needed to get it to working in my previous attempts - but this just magically did the trick.

As I said, I am still confused and would be really thankfull if someone could point out some possibilities of what could have gone wrong here - apart from that, my problem seems to be solved.

Thanks in advance!

Community
  • 1
  • 1
Vic Torious
  • 1,757
  • 3
  • 21
  • 24
  • Google says it may take several minutes before the key is activated. perhaps you hadnt waited long enough? –  Jul 10 '17 at 03:52