I have the following code:
File vcfFile = new File(this.getExternalFilesDir(null), "generated.vcf");
FileWriter fw = new FileWriter(vcfFile);
fw.write("BEGIN:VCARD\r\n");
...
It works fine on newer APIs, but on API 18 it crashes.
Caused by: java.io.FileNotFoundException: /generated.vcf: open failed: EROFS (Read-only file system)
I think this is the reason, but I can't find a work-around. It is the main feature of the app, so removing it isn't really an option for me.