How to get a FileInputStream for a file in internal memory in android that is not inside the default files directory files.
I created a new directory in my application space. Thus, openFileInput("filename") will only work for files in getFilesDir() . And openFileInput("filename") does not accept the argument with path separators "/", so I can change it to .. / myfolder /.
Is there a way to get a FileInputStream on this? ..
Note. Using the regular APIs File = new File (...) gives the allowed deviations. And I already created this Context.MODE_WORLD_WRITEABLE as permission for my custom folder.
To make it clear: My file is here ==> /data/data/com.app.package/app_myfolder/file1.tmp where "myfolder" ==> is created with permissions Context.MODE_WORLD_WRITEABLE .
I want to open FileInputStream on file1.tmp . (Usually your files here /data/data/com.app.package/files/file1.tmp and getFilesDir() point to this directory, so openFileInput("") takes an argument that exists in the same directory by default.)
source share