Google Places API - android

后端 未结 2 2001
情话喂你
情话喂你 2020-12-12 07:27

I am making an android application that needs to search in my local area within 10km and display the results onto a map using pins, For example: \"Starbucks\", \"Wallmart\",

2条回答
  •  渐次进展
    2020-12-12 07:47

    As far as the HTTP interface goes, your code LGTM assuming API_KEY holds a valid API key. That is, one created in the API console. Try printing out the whole request.url and see if it looks like this:

    https://maps.googleapis.com/maps/api/place/search/json?key=AIzaSyDoTeTuPXXXXXXXXXMHPVYM5VTg&location=37.994682,-87.6045923&radius=500&sensor=false

    Also see this thread because e.response isn't valid, maybe just remove that call to println and see what e looks like when it's thrown.

提交回复
热议问题