I try the context.openFileInput(FILE_NAME); but as the JavaDoc says, a path cannot be specify... why such a limitation? in this case it is clear that I need those files from within the same Activity... or well... I don't mind having them organize in folders at an Application level, but either case seams to be impossible.
I try also using java.io package straight, with the following code:
Using java Syntax Highlighting
- try {
- File file= new File("MyFile.txt");
- if(!file.exists()){
- file.createNewFile();
- System.out.println("Nuevo archivo creado...");
- }
- fos = new FileOutputStream(file);
- dos=new DataOutputStream(fos);
- dos.writeInt(2333);
- dos.writeChars("holamundo...");
- } catch (IOException e) {
- e.printStackTrace();
- }
Parsed in 0.031 seconds, using GeSHi 1.0.8.4
but throws
07-21 08:43:44.035: WARN/System.err(1338): java.io.IOException: Parent directory of file is not writable: MyFile.txt
And I don't know what else to prove




