I am building an Android app where I want to export some values to a CSV. I have to problem: either I get an error saying that the permission is denied or I get no errors but no CSV is created.
FileWriter writer;
File root = Environment.getExternalStorageDirectory();
File csvFile = new File(root, "xxx.csv");
writer = new FileWriter(csvFile);
String headers = String.format("%s,%s\n", "Timestamp",
"Value");
writer.write(headers);
writer.flush();
writer.close();
But i get nothing...