0
votes

Try to develop Android AutoComplete TextView using Google Place API, i encounter an weird error when i try my encoded URL in the browser.

https://maps.googleapis.com/maps/api/place/autocomplete/json?input=mar&types=geocode&sensor=false&key=BROWSER_KEY

{ "error_message" : "This API project is not authorized to use this API. Please ensure that this API is activated in the APIs Console: Learn more: https://code.google.com/apis/console", "predictions" : [], "status" : "REQUEST_DENIED" }

I try almost all the possible solution available on the web and also check in my google developer console Google Place API is enabled.

Please someone help me in this regard.

Thanks in Advance.

1

1 Answers

0
votes

You have to replace BROWSER_KEY in your URL with an actual key created in your developer console.

See: https://developers.google.com/places/webservice/intro#Authentication

Moreover, you can access the Google Places API through the Google Play services. No need to use the a the webservice on Android. (https://developers.google.com/places/android/start)