The application need write file’s last modification date.
void Dater(String DateFile) {
File file = new File(DateFile);
if(file.exists()){
Long lastModified = file.lastModified();
Date date = new Date(lastModified);
textView2.setText(String.valueOf(date));
}
}
But textView2 is empty.
The file is ok (I open it).
Dater("n" + String.valueOf(itemname)+".txt");
I think your file.exists() fails. Give the absolute path of the file
If internal file then
If on the sdcard then