1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| try {
//execute request
response = CustomHttpClient.executeHttpPost("http://XX.XXX.XX.XX/XXX/", postParameters).trim();
if (response.length() == 2)
Error.message(getBaseContext(), "27-1-", Integer.parseInt(response));
else {
String[] temp = response.split(" newrec ");
int recordsNr = temp.length;
piece = new Piece[recordsNr - 1];
for (int xtemp = 0; xtemp < recordsNr; xtemp++) {
temp[xtemp].split(";");
}
for (int xtemp = 0; xtemp < recordsNr; xtemp++) {
String[] temp2 = temp[xtemp].split(";");
if (xtemp < (recordsNr - 1))
piece[xtemp] = new Piece(Integer.parseInt(temp2[0]),Integer.parseInt(temp2[1]),Integer.parseInt(temp2[2]),temp2[3],temp2[4]);
alertDialogueVerifPdf(temp2[3],Integer.parseInt(temp2[1]));
}
}
}
catch (Exception e) {
e.printStackTrace();
} |
Partager