Вопрос

I was following this example to implement autocomplete functionality from google for my Android application. https://developers.google.com/places/training/autocomplete-android

But from JSON response I get the following:

02-07 12:53:31.202: D/JSON String(6815): {
02-07 12:53:31.202: D/JSON String(6815):    "predictions" : [],
02-07 12:53:31.202: D/JSON String(6815):    "status" : "REQUEST_DENIED"
02-07 12:53:31.202: D/JSON String(6815): }

I know that my API_KEY is right, because in the same activity I have implemented google map which works fine. Any ideas what's wrong?

SOLUTION:

You need to use Key for browser apps (with referers) from APIs console and not the one for Android apps!

Это было полезно?

Решение

For Places API you need to use Key for browser apps from APIs console even if you are implementing this functionality in Android application!

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top