[英]Export file from android app
I would export my data into download folder of internal sd. 我会将我的数据导出到内部sd的下载文件夹中。 Then, i have add the permission in manifest.xml:
然后,我在manifest.xml中添加了权限:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
I must add also the permission to write to internal storage? 我还必须添加写入内部存储的权限吗?
Then i call a method that include this: 然后我调用一个方法,包括:
String file = android.os.Environment.getExternalStorageDirectory().getAbsolutePath();
So, where i export my file? 那么,我在哪里导出我的文件? In what folder?
在什么文件夹? Can i change this folder?
我可以更改此文件夹吗?
Dude只打印你的文件String,它会告诉你路径,如果你在你的Phone / Emulator中添加了SDCARD,它会给你“/ sdcard / ..”,好像那个案例文件中没有sdcard会有null对象。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.