Search code examples
androidusb-drive

How to mount sdcard permanently?


Is there any way to write data to a sdcard, when the card is mounted as a disc via USB?

If I unplug it, everything is fine. How do I solve this problem? Anybody ideas or sample code?


Solution

  • Android allows only one mount at a time, so if you connect your device via USB and provide the card as a mount for your pc, android unmounts the card from the OS. That behavior cant be changed by an application and shouldnt be changed in the name of the data security.