- I am working to implement Mount/Unmount sdcard support in my Android application, Am able to get sdcard state by
Environment.getExternalStorageState()
.I know we can call Settings Intent and Mount/Unmount, but my requirement has to do programmatically with out calling Settings Intent. - Is it possible to Enable/Disable the Settings application in Android?
Asked
Active
Viewed 4,107 times
3

Cœur
- 37,241
- 25
- 195
- 267

Anil Kumar
- 1,065
- 1
- 13
- 24
-
See http://stackoverflow.com/questions/7430149/android-2-1-programatically-unmount-sdcard. You may need to root the device in order to do it. – Diego Torres Milano Sep 22 '11 at 02:13
-
i tried with Intent intent = new Intent(android.provider.Settings.ACTION_MEMORY_CARD_SETTINGS); startActivity(intent); but i want to handle Mount/Unmount sdcard through my activity, not from settings application, because that is my requirement.Please any more advice? – Anil Kumar Sep 22 '11 at 06:40
-
@Kumar - Are you able to unmount the SDcard , pls do help me if you have solution How to unmount sdcard programatically. – Rajat kumar Jun 24 '15 at 06:50
1 Answers
2
The settings app uses this permission <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
See if you can use it.

Ron
- 24,175
- 8
- 56
- 97
-
Thanks for spending time for me, above permission useful for Allows mounting and unmounting file systems for removable storage.but here i want Mount/UnMount functionality same like in settings->storage-> Mount/UnMount sdcard fuctionality. – Anil Kumar Sep 22 '11 at 06:35
-
I found this http://groups.google.com/group/android-developers/browse_thread/thread/10b3ca563c118ccf – Ron Sep 22 '11 at 07:19