1、准备一个Java端的程序
2、通过httpclient调用Java端数据
3、将json串转成对象
工具类:
package com.example.a01;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.params.CoreConnectionPNames;
import org.apache.http.util.EntityUtils;
import android.os.AsyncTask;
/**
* 封装 HttpClient对象POST请求
*
*/
public class HttpClientPost implements Serializable {
private static final long serialVersionUID = 1777547416049652217L;
private static HttpClient httpClient = new DefaultHttpClient();
static {
httpClient.getParams().setParameter(