Reputation: 127
Hi I'm trying to add an autocompletion to the searchView in my android app - for locations. I created an android key for my app, with my sha1 key, but it still keeps giving me this error. Can somebody help me solve this issue, or give me another api to use? Thanks!
Upvotes: 2
Views: 743
Reputation: 2110
Steps you need to follow are:
1) Go to the google api console
2) If you have already created a project then Go to the services tab and turn on Places API
3) Now go to API access and copy Browser Key not the Android key
4)Building the url to the web service like this:
String url = "https://maps.googleapis.com/maps/api/place/autocomplete/"+output+"?"+parameters;
5) Where parameters are:
String parameters = input+"&"+types+"&"+sensor+"&"+key;
and key is your browser key which you obtain from google console
Upvotes: 8