0

I am creating an image gallery application and you want to sort images by date, but when I use the method lastModified() 5000 files in folders or more, the list becomes very slow. My question is, as the native Android Gallery and other apps like QuickPic can do the listing by date so fast, even with many files?

  • 1
    What makes you think that they are calling `lastModified()` on `File` objects, as opposed to just getting the `DATE_MODIFIED` or `DATE_TAKEN` values from the `MediaStore` when they query to get the images? – CommonsWare Jun 17 '15 at 21:37
  • Thank you, your answer already removed my doubt. As soon as I had to list the images by date, I figured that Android should have a record of all the images and media entering, because the data query of the same would be very slow if tivesem to be made by the app developer, but I I read somewhere that the Linux file system does not save the date of the files, so I do not researched more in depth about something like MediaStore. Once again thank you for the response! – Paulo Tacio Jun 19 '15 at 02:34

1 Answers1

0

The answer to my question is in use of the media store images!

Get list of photo galleries on Android

Community
  • 1
  • 1