Thursday, April 18, 2013

[android help] Disable SDCard Access

android - Disable SDCard Access - Stack Overflow








Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

















I have a requirement where i need to block the user from having access to the device (phone) SDCard more like disable the SDCard completely. Is there a way i can achieve this? Can someone kindly guide me with some inputs on this.





























You can safely remove the sdcard, I think your requirement is same:



Intent i = new Intent(android.provider.Settings.ACTION_MEMORY_CARD_SETTINGS);
startActivity(i);


Unmounting the SD card is one of those actions which could be used maliciously if it wasn't under full user control. If it could be done purely in software (without user intervention) then code could disrupt other apps running on the device.























You can't unmount SD Card from running device according to you the best answer on this: (re)mounting the SD card on android emulator






















do you want your emulator to stop using SD -Card or phone.






















For what purpose you need to disable? To protect your application?If so, you can monitor by


using File observer. Do some stuffs like,If your application moves to particular path use



file.delete();






















default







.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...