-2

I am working on storage cleaner android app and i want to tell user that these files are not used since 3 months or some other time and ask user to delete them.

How can i do this in android programatically ??

Thanks

Zeeshan Mehdi
  • 1,241
  • 1
  • 17
  • 18
  • 1
    We are looking for your efforts. – meditat Jul 06 '18 at 08:19
  • It would be easier to assist if you show some of what you came up with and those who assist can rule out what you've already done that isn't working, or point out where you're going wrong. – Fabulous Jul 06 '18 at 08:20
  • I hope this link will work for you: [https://stackoverflow.com/questions/4856955/how-to-programmatically-clear-application-data/23470355](https://stackoverflow.com/questions/4856955/how-to-programmatically-clear-application-data/23470355) Good luck, G. – Gül Eda Aydemir Jul 06 '18 at 08:25

1 Answers1

0

Its answer was simple i found this after a bit of messing my head. just create file object like this

File file = new File(path_of_file_you_want_to_get_date_for);
Date date = new Date(file.lastModified());
Zeeshan Mehdi
  • 1,241
  • 1
  • 17
  • 18