I took my working app and converted it to a library so I can have multiple versions by using that library.
However, I’ve run into some problems. For example, I have a file that used to be copied from my assets folder into the data folder.
OutputStream output = new FileOutputStream(outFileName);
When I try and run this code I get a
java.io.FileNotFoundException: … (Permission denied)
error. I think this is because this is being called from code within my library and it is trying to write to the namespace of the app implementing the library.
What is the correct way to have code in the library write to the data folder?
I found my problem, I had changed the source but for some reason I had to refresh it in the new app before it read the change. outFileName was indeed wrong because of this and it was trying to write to the wrong path.