我正在创建一个文件“abc.txt”并存储数据。我怎样才能知道哪里是存储在SD卡中的数据,我没有Android手机如何知道由App创建的文件的文件路径
try {
FileOutputStream fos = openFileOutput("abc.txt",MODE_PRIVATE);
String s = "Data to be written ok fine cool";fos.write(s.getBytes());
} catch (Exception e) {
e.printStackTrace();
}
我想要的文件,这样我可以sattach,并在后台
作为电子邮件发送
你确定它是在SD卡......因为看起来你没有使用Environment.getExternalStorageDirectory( ) –