I am trying to get the last modified date of the internal file, and it always returns me 0, although I could read the file correctly. Could you tell me if I am doing something wrong ...
Creating a file ...
FileOutputStream Os = activity.openFileOutput ("file1.jpg", Context.MODE_PRIVATE);
cachedImage.compress (CompressFormat.JPEG, 75, Os);
Os.close ();
Reading file ...
long mod_time = 0;
File file = new file ("file1" .jpg ");
mod_time = file.lastModified ();
FileInputStream Is = activity.openFileInput ("file1.jpg");
cachedImage = BitmapFactory.decodeStream (Is);
Close();
mod_time is always zero !!!!
source share