I need to write some data to a temporary file on Android, but trying to write to a newly created TemporaryFile object I get an assert:
if (temporaryFile.exists()) { // Have a few attempts at overwriting the file before giving up.. for (int i = 5; --i >= 0;) { if (temporaryFile.moveFileTo (targetFile)) return true; Thread::sleep (100); } } else { // There's no temporary file to use. If your write failed, you should // probably check, and not bother calling this method. jassertfalse; }
Has anyone had any sucess with this class on Android? The same code works fine for me on my PC.