当卡通过USB安装为光盘时,有没有办法将数据写入SD卡?
我获得了许可拒绝例外.如果我拔掉它一切都很好.
我知道我应该使用Environment.getExternalStorageDirectory,但我不认为这会有任何区别.
码:
File file = new File("/sdcard/Test/test.txt");
BufferedOutputStream buf = new BufferedOutputStream(
new FileOutputStream(file,true));
buf.write(str.getBytes());
Run Code Online (Sandbox Code Playgroud)
谢谢,
尼古拉斯
| 归档时间: |
|
| 查看次数: |
1281 次 |
| 最近记录: |