title: How to periodically scan SD card for files of a particular type?
body: <p>Hi I am pretty new to android and am working on an app that needs to scan the SD card for ppt and pdf files and upload them to Google Drive. </p>
  
  <p>I have implemented a <strong>MediaScannerConnectionClient</strong> class (in a similar way to the code in this question <a href="https://stackoverflow.com/questions/13800667/how-to-scan-sd-card-for-particular-extension-of-files-in-android">How to scan SD card for particular extension of files in android?</a>) that scans and returns the file once when <strong>scanFile</strong> is called. </p>
  
  <p>However I need to be able to upload the files that are added to the SD card even after my app has been started and <strong>scanFile</strong> has been called. </p>
  
  <p>Is there any way to do this besides calling <strong>scanFile</strong> continuously after a fixed time interval ?</p>
  
  <p>Thanks in advance</p>