在我的应用程序中我想使用google place api来获取最近的地方,如atm,巴士站等... 但它返回null结果.. url是
和代码是::
String data = "";
InputStream iStream = null;
HttpURLConnection urlConnection = null;
try{
URL url = new URL(strUrl);
urlConnection = (HttpURLConnection) url.openConnection();
urlConnection.connect();
iStream = urlConnection.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(iStream));
StringBuffer sb = new StringBuffer();
String line = "";
while( ( line = br.readLine()) != null){
sb.append(line);
}
data = sb.toString();
br.close();
}catch(Exception e){
Log.d("Exception while downloading url", e.toString());
}finally{
iStream.close();
urlConnection.disconnect();
}
return data;
我有很多链接,但没有锦鲤帮milii ....
How can I search places with specific types using Google Places API?
finding both "Shopping_mall" and "food" within single URL for google places API
答案 0 :(得分:0)
你使用密钥,即Android应用程序的密钥..而不是浏览器应用程序的密钥..使用dis ..它一定会运行... gud luck