title: Android: Keep an up to date record of local files relevant to the app
body: <p>I've been reading about Content Providers and the Media Store but I'm still not sure what's the best way to solve this common problem.</p>
  
  <p>To simplify, let's say I want to create an app to read ebooks. Users will copy their ebooks in the device storage somehow (i.e: using the USB and their computer, from dropbox, email...).
  Ebooks might be in several formats (mobi, epub,...). Since those files are not media files, I cannot use the Media Store for that purpose. It's also important to note, that I don't want a concrete solution for certain kinds of files (such as ebooks in my example). I would like a solution valid for all kind of files, even the most exotic ones. </p>
  
  <p>I would like to perform a scan of the device storage to display a list of the ebooks saved in the device. I guess that should be done the first time the app is launched and afterwards if the user wants to update the list.</p>
  
  <p>The problem I see is that the user may delete some of the ebook files outside my app, so it may show some old entries which are not there anymore. Of course I can show an error message if the user selects a removed entry, but maybe there is a better solution to that.</p>
  
  <p>My question is basically what is the best strategy to keep the file list up to date. With "best strategy" I mean, to avoid potential critical errors and making everything as much transparent to the user as possible.</p>