Professional Documents
Culture Documents
app
implementation
‘org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.a
pache.http.client:4.1.2'
new leeJSONPOST().execute(
"http://sistematizaciongro.com.mx/push/
webservice1.php" );
try {
JSONObject jsonObject = new JSONObject(result);
JSONArray OJson =
jsonObject.getJSONArray("items");
String campo1="";
//recorremos el arreglo
for (int i = 0; i < OJson.length(); i++) {
JSONObject c = OJson.getJSONObject(i);
String tit = c.getString("titulo");
txtresp.setText(tit);
campo1 = campo1 + tit + "\n";
txtresp.setText(campo1);
} catch (Exception e) {
Log.d("JSON", "error en datosssss");
txtresp.setText("error en datos..post..");
}
}
//AÑADIR PARAMETROS
params.add(new BasicNameValuePair("us",
txtP1.getText().toString()));
// params.add(new BasicNameValuePair("p1",
txtP2.getText().toString()));
httppost.setEntity(new
UrlEncodedFormEntity(params));
// return text;
} else {
Log.d("JSON", "Failed to download file");
}
} catch (Exception e) {
Log.d("readJSONFeed", e.getLocalizedMessage());
}
return stringBuilder.toString();
}
}