I want to turn on/off the USB mass storage in Android.
I tried the below code. It's not working. Can any one please help me in this?
To disable the Mass storage I have used this:
Settings.Secure.putInt(getcontentResolver(),Settings.Secure_MASS_STORAGE_ENABLED,0)
To enable the Mass storage I have used this:
Settings.Secure.putInt(getcontentResolver(),Settings.Secure_MASS_STORAGE_ENABLED,1)
The code above is not working though. Am I need to pass any intent for this?