Writing Text File to SD Card fails

后端 未结 5 691
长发绾君心
长发绾君心 2020-11-30 09:07

I have a strange problem I\'ve come across. My app can write a simple textfile to the SD Card and sometimes it works for some people but not for others and I have no idea wh

5条回答
  •  渐次进展
    2020-11-30 09:59

    Are you checking that the external storage is writeable? If not then try using...

    Environment.getExternalStorageState()
    

    This will tell you if the SD card is mounted and you can also check if it's writeable. That's all I can think of to suggest at this point.

提交回复
热议问题