我想打開/關閉Android中的USB海量存儲。如何在Android中以編程方式關閉USB海量存儲?
我試過下面的代碼。它不工作。任何人都可以幫助我嗎?
要禁用海量存儲我已經使用這個:
Settings.Secure.putInt(getcontentResolver(),Settings.Secure_MASS_STORAGE_ENABLED,0)
爲了使海量存儲我已經使用這個:
Settings.Secure.putInt(getcontentResolver(),Settings.Secure_MASS_STORAGE_ENABLED,1)
上面的代碼不工作,雖然。我需要通過任何意圖嗎?
檢查[這裏]這個鏈接[1] [1]:http://stackoverflow.com/questions/7396757/programmatically-turn-off-usb-storage-on-android-devices –