Reputation: 2767
I am developing a recording app which saves the recorded files in subfolders. I want to display my recordings in a list
I want to know which approach is the best and fastest.
Scan the folders and display the video files in a listview or store the recorded files details in a database and retrieve them in the database and display them in a listview?
Upvotes: 0
Views: 46
Reputation: 29280
A database is a better solution because it lets you use a Loader so you can refresh your list automatically if any changes happen to the list of files.
A database will also let you use queries, for instance videos of a certain length, or made after a certain date, and so on, provided that you store the relevant information in the database.
The only issue you have to be wary of is that you have to keep your database and the files in sync (the database would have the path to the file), so whenever you make a change to a file (add, edit, remove, ...) you need to reflect that change in your database.
Upvotes: 2