开发者

Wipe external storage doesn't work

Has anyone tried this flag for wipeData()? I think WIPE_EXTERNAL_STORAGE flag doesn't work because after calling the function, it will reset the ph开发者_开发百科one to factory settings leaving the previous data on the external storage device. I hope someone can confirm about this one.

Thanks


From the documentation for wipeData(): External storage such as SD cards will not be erased. Also, the parameter currently must be 0. I've been wrestling with this issue as well and have found the only solution is to get the path from Environment.getExternalStorageDirectory() and recursively delete directory contents.


It is an existing issue in Android.

Refer: http://code.google.com/p/android/issues/detail?id=65788

This works on some devices (I have tested with Samsung S4 and it works fine), but may not work in some (tried with Samsung S2 and SD card wipe failed, but the phone got factory reset).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜