How do files end up in the ...AppName/files folder on Android?

I am trying to load a file with ofLoadImage, but OF is not finding it. Dumping the path OF expects tells me it should be in the files folder in my app data folder. How should it get copied there? Adding them as a asset folder in Android studio does not work.

I have been using the image example app as a model, but can’t for the life of me work out where in the build process the files in its data folder get copied to the device. Sure its a basic fail on my part, but what am I missing?

Are you looking for /res/raw/

I was indeed, thanks.

So everything in the data/bin folder is zipped as /res/raw/ and then unzipped on the device when the app is installed? (or executed?)

Where in the makefile/gradle does that happen?



Thanks. Where in the makefile are those files zipped up?

Each app has its own addons.make file where its addons are listed. For example see examples/android/androidEmptyExample/addons.make

The main makefiles read addons.make file of the project and compile the necessary addons with the app.

You can search the word “addon” inside the main makefiles to find what you are looking for. The main makefiles of openFrameworks are located under:

  • libs/openFrameworksCompiled/project/makefileCommon
  • libs/openFrameworksCompiled/project/android