Google Places API를 사용하여 특정 지역의 레스토랑 목록을 가져 와서 표시하고 싶습니다. 나는이 시도하지만, 아무것도 표시되지 않습니다, 나는 오류가없는 : 그래서 보이는JsonObjectRequest가 반환하지 않음
{
"error_message": "This API project is not authorized to use this API. Please ensure this API is activated in the Google Developers Console: https://console.developers.google.com/apis/api/places_backend?project=_",
"html_attributions": [],
"results": [],
"status": "REQUEST_DENIED"
}
: 웹 브라우저에서 URL 그것이 문제가 무엇인지 당신에게 말할 것이다하려고하면
String url="https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-45.730425,4.839938&radius=500&types=food&key=AIzaSyD8vqYPQzJRJa3rOLSC1wqIaUxSN0WcvGc";
JsonObjectRequest jsObjRequest = new JsonObjectRequest
(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
Log.d("json", response.toString());
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
// TODO Auto-generated method stub
Log.d("json", "not working");
}
});