我想這個數據----> 「#$ 1 $埃及@مصر 」從這個鏈接 - >「 http://184.173.7.132/mobile.aspx?action=4」如何在android中執行GET方法?
我用這個代碼,但響應NULL
public HttpResponse doGet(String url) throws Exception {
HttpResponse response = null;
try {
HttpClient httpclient = new DefaultHttpClient();
HttpGet httpget = new HttpGet(url);
response = httpclient.execute(httpget);
}
catch (IOException e) {
e.printStackTrace();
}
return response;
}
你會得到IOException嗎? - 您是否已將INTERNET權限添加到清單中? – Marqs