2012年3月16日
摘要: 使用Get方法提交: 其他步骤与上一节的操作相符,只是在传送地址的时候发送参数的格式如下: //Sname和Sage是实际的数据 name和age则是例如是输入框中的名字 url = "服务器的地址"+ "?" + "name=" + Sname + "&age=" + Sage;使用Post方法提交: //使用NameValuePair类来保存键值对,使用NameValuePair类是因为下面需要的那个类的参数要求 NameValuePairNameValuePair1 = newNameValuePai 阅读全文
posted @ 2012-03-16 16:50 lee0oo0 阅读(7384) 评论(0) 推荐(0)
摘要: //生成一个请求对象 HttpGet httpGet = new HttpGet("http://www.baidu.com"); //生成一个http客户端对象 HttpClient httpClient = new DefaultHttpClient(); //客户端向服务器发送请求,返回一个响应对象 HttpResponse httpResponse=httpClient.execute(httpGet); //根据响应得到实体内容 HttpEntity entity =httpResponse.getEntity(); //使用I... 阅读全文
posted @ 2012-03-16 15:49 lee0oo0 阅读(1013) 评论(0) 推荐(0)
摘要: 系统打电话界面:Intent intent = new Intent();//系统默认的action,用来打开默认的电话界面intent.setAction(Intent.ACTION_CALL);//需要拨打的号码intent.setData(Uri.parse("tel:"+i)); callPhoneAndSendMessage.this.startActivity(intent);系统发短信界面:Intent intent = new Intent();//系统默认的action,用来打开默认的短信界面 intent.setAction(Intent.ACTION_ 阅读全文
posted @ 2012-03-16 11:20 lee0oo0 阅读(13708) 评论(0) 推荐(1)