Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Read txt file in res/raw/ within Android NDK

I have a file within my application that I want to have included within the .apk for my android app that is a .txt file. My application is almost entirely written in C through the use of the NDK, using OpenGL as well. I know I can bundle the txt file by placing it in /res/raw/, but is there anyway I can access this within the android NDK?

-Thanks

like image 999
RyanCheu Avatar asked Jan 09 '10 20:01

RyanCheu


1 Answers

See the native-audio sample in the NDK. This has code that reads from the assets folder.

like image 107
Matthew Willis Avatar answered Oct 21 '22 21:10

Matthew Willis