I found out that you can use something like this to create a file:
FileOutputStream fs = openFileOutput("/test.in", MODE_WORLD_WRITEABLE);
String s = "[Head]\r\n";
s += "Type=2";
byte[] buffer = s.getBytes();
fs.write(buffer);
fs.close();
When running the above code I get an IllegalArgumentException stating:
java.lang.IllegalArgumentException: File /test.in contains a path separator
and Im guessing the "/" is not appreciated. I wanted the "/" since I need to write the file to the root directory of the device, as stated in the API in trying to follow:
A request is a textfile (UNICODE) with the file extension ".in". The application reads and parses the .in file when it's placed in root directory on the mobile device.
Question is: how do I place a file in the root-directory? I have been looking around for an answer, but havent found one yet.
regards