I get the following error:
Caused by: java.lang.NumberFormatException: Invalid int: "1437061569000"
Full error here.
I have checked whether the string is null, applied the trim() and replace() methods to remove any non integer characters.
The line of the error (42) is the line on which the parseInt method is ran on the string.
Code here:
@Override
protected String doInBackground(String... college) {
String data_url = "......";
int lastUpdateTimestamp;
try {
String data = DownloadText(data_url).trim().replaceAll( "[^\\d]", "" );
Log.e("doinback", data);
if (data == null) { Log.e("doinback", "ITS NULL"); }
lastUpdateTimestamp = Integer.parseInt(data);
res = "done";
} catch (IOException e) {
res = "ERROR";
}
return res;
}