Passing a file path to a bundled asset into an external library on Android
So I have an external C++ library that I have included into my Android App via the NDK. THe main method on this library requires me to pass in a string representing the absolute path to a file. The file in question is bundled into the APK file. I开发者_如何学Pythons there no way that I can decode this so that I can use the external library?
Thanks, Stephen
You will need to copy the file from wherever it is in the APK (asset, raw resource, etc.) to the local filesystem, then supply that path to the library. Or, modify the library to call back into Java to access the InputStream
you get for the in-APK file.
精彩评论