Question

I am trying to write a code that lets me programmatically switch a file from one of my resources folders to my assets folder. I have tried the usual file.renameTo method that has worked so very well for me in the past....but with android it seems to do nothing...

Was it helpful?

Solution

The assets and res folders are part of the structure of the .apk file. This isn't something that can be changed by the application on the phone. You can create a folder structure in the phone's file system, but that will need to be accessed from your app by the file access api, not as assets or resource identifiers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top