Blog coding and discussion of coding about JavaScript, PHP, CGI, general web building etc.

Monday, March 14, 2016

Android Google Places API

Android Google Places API "PLACES_API_QUOTA_FAILED"


Ok, so I am kinda new to Google maps/geo etc. So I went to the Google console, added an application, enabled "Places API for Android", copy pasted the API key like this :

  

I have an activity where I did

mGoogleApiClient = new GoogleApiClient.Builder(this) .enableAutoManage(this, 0 /* clientId */, this) .addApi(Places.GEO_DATA_API) .build();

Copy pasted the adapter from the samples code. Everything compiled fine, autocompletetextview was setup properly and all.

Now when I started typing, it throws an error immediately Error getting autocomplete prediction API call: Status{statusCode=PLACES_API_QUOTA_FAILED, resolution=null}

I searched and searched and guess what, google doesn't even have this error code in their documentation! Has anybody faced this? Am I missing something here?

P.S - I added the app a day ago so definitely my quota is not over. Also its a different error code for exhausted quota.

Answer by Francois Wouts for Android Google Places API "PLACES_API_QUOTA_FAILED"


Sorry about this confusing error code?we're working on getting that fixed.

This could be due to an incorrect certificate fingerprint in your Developers Console configuration. Would you mind double checking the instructions at https://developers.google.com/places/android/signup#find-cert?

Let me know if that works.

Answer by Uday for Android Google Places API "PLACES_API_QUOTA_FAILED"


So, the problem was, I had generated an "Android Key" (which I thought was logical because I was developing an android app). That didn't work and gave me this confusing code. Then I went back, deleted that key, and generated a "Server Key" and pasted that code in the app manifest. Guess what, it worked!

Most peculiar behavior and this step is not even mentioned in the documentation as to why this is logical.

Answer by Diogo Paschoal for Android Google Places API "PLACES_API_QUOTA_FAILED"


In my case, the error was generated because a new sdk and android studio install. So, just following the steps in the Google tutorial solved the problem: https://developers.google.com/places/android/signup#find-cert

Answer by raluca for Android Google Places API "PLACES_API_QUOTA_FAILED"


I had the same issue. For me the problem was fixed by enabling the api via:

https://console.developers.google.com/flows/enableapi?apiid=placesandroid&keyType=CLIENT_SIDE_ANDROID&reusekey=true

and regenerate key as a server one

Answer by Rem-D for Android Google Places API "PLACES_API_QUOTA_FAILED"


I changed my package name during the development stage. After changing the package name on the Developers Console api key apps I came across this error. The solution was to simply wait 5 minutes or so after changing the key in the Developers Console. The Developers Console does clearly state this but it's easy to ignore.


Fatal error: Call to a member function getElementsByTagName() on a non-object in D:\XAMPP INSTALLASTION\xampp\htdocs\endunpratama9i\www-stackoverflow-info-proses.php on line 72

0 comments:

Post a Comment

Popular Posts

Powered by Blogger.