getting resources ?


i have some files in res/raw/

how do i get the path (if possible?) / and or the resource from that directory?

i know some resources are compressed, but i can’t even load a png from that directory, which is odd.

Any ideas?

resources in raw or any other standard android path can only be accessed directly from the java side using an InputStream. the easiest way to access resources from c++ in OF is to put them in bin/data. the application will move them to the app data folder in the sdcard when it starts

okay, thanks!

may i ask you where does this happen? i guess in a makefile? i’m asking because i’m merging two projects, one from java/ndk and the other with openframworks, and i started from the first one so bin/data/ isn’t copied

yes this resources are compressed in the makefile then the application uncompress thems on the device when the app starts in a call that starts in OFAndroid extracting that zip from the apk to the sdcard then in the c++ side uncompressing that zip

okay, thanks!