title: Android: Automount mass storage issue when plugging USB cable
body: <p>I'm developing an app that makes file downloads, handles lists, contains a map, and so on.</p>
  
  <p>My problem appears when I use a device that has the automount mass storage option activated.
  If, at some moment, while running my app, I plug in the USB cable for some reason (charge, copy pics while app is in background, see app logs etc), the mass storage is mounted automatically and all my activities are recreated and my app status is lost. </p>
  
  <p>OK, I could keep some data in DB/preferences in order to be able to restore it, but it's not ok to keep each variable in DB or preferences.</p>
  
  <p>I know that there is an option is settings where I can uncheck this option, but I cannot ask this to every user that will use my app.</p>
  
  <p>I also tried to find a solution to programatically uncheck the automount setting, but I couldn't find one.  </p>
  
  <p>I ran out of solutions. Any idea is more than welcome.</p>
  
  <p>Thanks.</p>