最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

從 android 應(yīng)用程序響應(yīng)時間發(fā)送 php 查詢到服務(wù)器

從 android 應(yīng)用程序響應(yīng)時間發(fā)送 php 查詢到服務(wù)器

幕布斯7119047 2019-03-19 17:18:32
我想在數(shù)據(jù)庫中放入一個entry。用的下面的代碼:String url = String.format("http://xxxxxxx/xxx/index.php?home=yes&pid=%s", pid);         // Create a new HttpClient and Post Header         HttpClient httpclient = new DefaultHttpClient();         HttpPost httppost = new HttpPost(url);     try {         ResponseHandler<String> responseHandler = new BasicResponseHandler();         String response = httpclient.execute(httppost, responseHandler);          Log.e("abc", response);         return response;         } catch (ClientProtocolException es)          {                Log.e("x" , es.getMessage());             return "";         } catch (IOException e)          {             Log.e("aasx" , e.getMessage());             return "";         }這段代碼能正常運行,現(xiàn)在當(dāng)有網(wǎng)絡(luò)連接的時候,代碼就會困在httpclient.execute(httppost, responseHandler); 大約倆分鐘。有什么方法可以實現(xiàn)檢查幾秒鐘后,如果沒有反應(yīng)的就會就catch the exceptions?
查看完整描述

目前暫無任何回答

  • 0 回答
  • 0 關(guān)注
  • 826 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號