How to recover images from an android device through a date?

Asked

Viewed 42 times

1

I need to recover all images (internal and/or external) that is on my device, but I need to filter this search for a date. Example: I need to find all the photos taken on 10/02/2016. Just out of curiosity, after getting this list, I will fill a recyclerview with the recovered images, that part I know how to do.

I’ve searched for hours and couldn’t find anything that could help me.

Thank you in advance.

  • While no one answers, see if this gives you a "North" of how to solve this: http://stackoverflow.com/a/2390177/5524514

1 answer

0

You can use the lastModified() class File:

File file = new File("seu_path.jpg");
Date dataImagem = new Date(file.lastModified());
Log.i("Data do arquivo @ : "+ dataImagem.toString());
  • 1

    This method returns me the date of the last modification of a file (being that I need to inform which file), that’s not what I need, I have to recover the images of a certain date, for example, recover the images that were created on 02/16/2016. I give the date and retrieve the images from that day.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.