out = new FileOutputStream(destTmpFile);\r
} catch (Exception e) {\r
Log.e("THAD", "Error downloading file", e);\r
- setDownloadStatus("Error downloading file: \n" + e.getLocalizedMessage());\r
+ setDownloadStatus(String.format(getString(R.string.errorDownloadingFile), e.getLocalizedMessage()));\r
return;\r
}\r
\r
out.write(bytes, 0, bytesRead);\r
byteCount += bytesRead;\r
if (count++ % 20 == 0) {\r
- setDownloadStatus(String.format("Downloading: %d bytes so far",\r
+ setDownloadStatus(String.format(getString(R.string.downloading),\r
byteCount));\r
}\r
}\r
} else {\r
Log.d("THAD", "Stopped downloading file.");\r
}\r
- setDownloadStatus(String.format("Downloaded finished: %d bytes",\r
+ setDownloadStatus(String.format(getString(R.string.downloadFinished),\r
byteCount));\r
} catch (IOException e) {\r
Log.e("THAD", "Error downloading file", e);\r
- setDownloadStatus("Error downloading file: \n"\r
- + e.getLocalizedMessage());\r
+ setDownloadStatus(String.format(getString(R.string.errorDownloadingFile), e.getLocalizedMessage()));\r
}\r
}\r
};\r