1
Hello, in my app I download a CSV file, but it never appears in Smartphone Downloads, I can only view it with the File Manager. And also when I try to pass the file to the computer, I can’t find the directory that was saved. The file path is this /Storage/Emulated/0/Download/16hrs.csv. How do I show the file on smartphone downloads and how do I get this file from the computer? obg
private File getStorageDir(String fileName) {
return new File(Environment.getExternalStoragePublicDirectory( Environment.DIRECTORY_DOWNLOADS), fileName);
}
File f = getStorageDir(fileName);
FileWriter mFileWriter = null;
mFileWriter = new FileWriter(filePath , true);
writer = new CSVWriter(mFileWriter,';',' ');
String[] dTitle = {"Academia","Data", "Turma","Aluno","Piscinas","Metros","Tempo"};
writer.writeNext(dTitle);
writer.close();
mFileWriter.close();