//---SD Card Storage---File sdCard = Environment.getExternalStorageDirectory();File directory = new File (sdCard.getAbsolutePath() +“/MyFiles”);directory.mkdirs();File file = new File(directory, “textfile.txt”);FileOutputStream fOut = new FileOutputStream(file);OutputStreamWriter osw = newOutputStreamWriter(fOut);//---write the string to the file---osw.write(str);osw.flush();osw.close();
添加回答
舉報
0/150
提交
取消