I am testing Android project using Google custom search API, my code are as
follows
String uriAPI =
"https://www.googleapis.com/customsearch/v1?key="+API_key+"&cx=013036536707430787589:_pqjad5hr1a&q=flowers&alt=json";
HttpGet httpRequest = new HttpGet(uriAPI);
HttpResponse httpResponse;
try {
httpResponse = new DefaultHttpClient().execute(httpRequest);
Log.v("zf", ""+httpResponse.getStatusLine().getStatusCode());
if(httpResponse.getStatusLine().getStatusCode() == 200){
String strResult =
EntityUtils.toString(httpResponse.getEntity());
Log.v("zf", strResult);
}
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
However, I got "access not configured" err. I am sure I got valid android
key.
Could anyone help, my project number is 89334321388
--
--
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
To view this message on the web, visit
https://groups.google.com/d/msg/google-ajax-search-api/-/yYhKsaiSi-MJ
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en