doAskTask =
new
Runnable() {
@Override
public
void run() {
ggname = etname.
getText
().toString();
ggworkid = etworkid.
getText
().toString();
ggcallid = etcallid.
getText
().toString();
String baseurl = ConfidDatas.askbaseurl;
String askstr =
"name="
+ ggname +
"&callid="
+ ggcallid
+
"&workid="
+ ggworkid;
String result = null;
HttpGet httpGet =
new
HttpGet(baseurl + askstr);
HttpResponse httpResponse = null;
try
{
httpResponse =
new
DefaultHttpClient().execute(httpGet);
}
catch
(ClientProtocolException e) {
e.printStackTrace();
}
catch
(IOException e) {
e.printStackTrace();
}
Message msg =
new
Message();
Bundle data =
new
Bundle();
if
(httpResponse.getStatusLine().getStatusCode() == 200) {
try
{
result = EntityUtils.toString(httpResponse.getEntity());
data.putString(
"value"
, result);
data.putString(
"result"
,
"isok"
);
msg.setData(data);
handler.sendMessage(msg);
}
catch
(ParseException e) {
}
catch
(IOException e) {
}
}
else
{
data.putString(
"value"
,
""
);
data.putString(
"result"
,
"iserr"
);
msg.setData(data);
handler.sendMessage(msg);
}
}
};