@@ -0,0 +1,1350 @@
+package br.com.caelum.task;%0A%0Aimport java.util.List;%0A%0Aimport org.json.JSONException;%0A%0Aimport br.com.caelum.cadastro.dao.AlunoDAO;%0Aimport br.com.caelum.cadastro.modelo.Aluno;%0Aimport br.com.caelum.cadastro.support.WebClient;%0Aimport br.com.caelum.converter.AlunoConverter;%0Aimport android.app.ProgressDialog;%0Aimport android.content.Context;%0Aimport android.os.AsyncTask;%0Aimport android.widget.Toast;%0A%0Apublic class EnviaContatosTask extends AsyncTask%3CObject, Object, String%3E %7B%0A%09private final String endereco = %22http://www.caelum.com.br/mobile%22;%0A%09private String jsonDeResposta;%0A%09private Context context;%0A%09private ProgressDialog progress;%0A%09%0A%0A%09@Override%0A%09protected String doInBackground(Object... params) %7B%0A%0A%09%09AlunoDAO dao = new AlunoDAO(context);%0A%09%09List%3CAluno%3E lista = dao.getLista();%0A%09%09dao.close();%0A%09%09%0A%09%09%09String listaJSON = null;%0A%09%09%09try %7B%0A%09%09%09%09listaJSON = new AlunoConverter().toJson(lista);%0A%09%09%09%7D catch (JSONException e) %7B%0A%09%09%09%09// TODO Auto-generated catch block%0A%09%09%09%09e.printStackTrace();%0A%09%09%09%7D%0A%09%09%09jsonDeResposta = new WebClient(endereco).post(listaJSON);%0A%09%0A%09%09return jsonDeResposta;%0A%09%7D%0A%0A%09protected void onPreExecute()%7B%0A%09%09progress = ProgressDialog.show(context,%22Aguarde%22,%22Envio de dados para a web%22,true,true);%0A%09%7D%0A%09%0A%09@Override%0A%09protected void onPostExecute(String result) %7B%0A%09%09progress.dismiss();%0A%09%09Toast.makeText(context, result, Toast.LENGTH_LONG).show();%0A%09%7D%0A%0A%7D%0A

Create EnviaContatosTask.java