Well, you have access to stdio.h. So if it's in a known place (say on an SD card), you can just use this as a path. And there are many online tutorials about the hot use of stdio (fopen, fclose, etc.).
The problem is that the resources that you associate with apk itself (either in res / raw or in assets) remain inside apk after installation. What's worse is that by default they will be compressed, which makes reading impossible. This can be avoided, and the easiest way is to rename the asset for the extension .mp3 (or others). The reason for this is that, by default, .mp3 is not compressed, regardless of whether it is an mp3 file). There are other extensions you can use and ways to tell tools not to compress your data if you don't like to name all your assets with .mp3 at the end.
So, you have several options:
Download your resources from the network at the first start, place them in an unobtrusive place (it is best to get this path from sdk at boot) and use it.
Store your resources in apk (remember the .mp3 extension in the resource folder). At the first start, extract the assets to a folder that you have access to (and not annoy the user), and use the resources from there.
(what am I doing) Store your resources in apk (.mp3 again) and use jni to read directly from apk. Yes, jni is a bit slower, but you still shouldn't read from the file system and, of course, not at a performance critical point. Nvidia has some very useful code that you can use, you can find here , this is in the code example, if I remember. Inside the libs folder there are some good general purpose libraries that you can use that match stdio, except that they are also read from apk itself.
Hope this helps.
source share