HttpClient hc=new DefaultHttpClient(); Cursor c=db.rawQuery("select * from ADM ",null); while(c.moveToNext()) { hp=new HttpPost("http://10.0.2.2:25582/CallBookWeb/Default2.aspx?xxx="+c.getString(0)+"&yyy="+c.getString(1)); HttpResponse response = hc.execute(hp); HttpEntity entity = response.getEntity(); BufferedReader in = new BufferedReader(new InputStreamReader(entity.getContent()), 65728); String msg = in.readLine(); if(msg.contains("success")) { updat(c.getString(0)); Toast.makeText(getBaseContext(), "fff"+entity, Toast.LENGTH_LONG).show(); } }
public void updat(String c) { Cursor c1=db.rawQuery("update ADM set status='y' where id="+c,null); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)