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!
1 Answer
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
-
1Thanks so much if i could i would up vote you a billion times! You saved a lot of time for me. Commented Jul 21, 2014 at 4:30
-
-
Salute @Pankaj plus one, I am trying this from the two day but not solved, after seen this answere and maily point Browser Key not the Android key then i solved my question. thank you for saving my more wasted time. But i have one question why we have to use Browser key , not android key here ? Commented Aug 13, 2015 at 12:53