通过使用此代码,我获得了所有场地详细信息,在这里我想要一个特定类型的场地让我们说'酒店','餐馆'如何在下面的代码中指定。
DefaultHttpClient httpclient = new DefaultHttpClient();
final HttpParams httpParams = httpclient.getParams();
HttpConnectionParams.setConnectionTimeout(httpParams, 30000);
HttpConnectionParams.setSoTimeout(httpParams, 30000);
HttpGet httppost = new HttpGet(
"https://api.foursquare.com/v2/venues/search?intent=checkin&ll="
+ lat + "," + longi + "&client_id=" + client_id
+ "&client_secret=" + client_secret + "&v="
+ 20131008); //
答案 0 :(得分:0)
尝试将此修改后的网址发送到fox这个问题。我们可以直接过滤场地。
try {
httppost = new HttpGet(
"https://api.foursquare.com/v2/venues/search?intent=checkin&ll="
+ lat + "," + longi + "&client_id=" + client_id
+ "&client_secret=" + client_secret +"&query="+ URLEncoder.encode("Hotel|Bar|Club|Cafe|CoffeeShops", "utf-8")+ "&v="
+ 20131008);
} catch (UnsupportedEncodingException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} //