请问号码归属地查询是怎么做的啊,有相应的数据库吗?
解决方案 »
- 安卓怎样跟电脑端的数据库进行交互。
- Android来电界面的滑动按钮如何实现啊?有无源代码
- 求可用rtsp地址
- 问一下很简单的问题电脑连接Android手机输入命令的时候能否自动补全。
- Service中通过intent取得值的问题
- 调用notifyDataSetChanged,自动滚动到底部,现在不想让界面移动
- android+javaee 开发聊天系统,求思路
- 那位知道Android mapView为何没有混合地图
- 求救!!!
- MonkeyRunner怎么实现图案解锁呢?
- 软件管理器的Android小程序,但怎么都无法读取系统自带的应用程序和已安装的应用程序
- setListAdapter()总是显示有误
public static PhoneInfo getPhoneInfo(String no) {
try {
HttpGet request = new HttpGet(
"http://sj.kvgo.net/?type=json&number=" + no);
HttpParams params = request.getParams();
HttpConnectionParams.setSoTimeout(params, 60000); // 1 minute
request.setParams(params); String result = mHttpClient.execute(request,
new BasicResponseHandler());
if (result != null && result.length() > 0) {
PhoneInfo ai = new PhoneInfo();
JSONObject jb = new JSONObject(result);
ai.setMobile(jb.getString("mobile"));
ai.setProvince(jb.getString("province"));
ai.setCity(jb.getString("city"));
ai.setPost_code(jb.getString("post_code"));
ai.setArea_code(jb.getString("area_code"));
ai.setCard(jb.getString("card"));
ai.setNumber(jb.getString("number"));
return ai;
} } catch (IOException e) {
e.printStackTrace();
} catch (JSONException e) {
e.printStackTrace();
}
return null;
}
下面是调用的URL:http://webservice.webxml.com.cn/WebServices/MobileCodeWS.asmx