Access Android APK Asset data directly in c++ without Asset Manager and copying Access Android APK Asset data directly in c++ without Asset Manager and copying android android

Access Android APK Asset data directly in c++ without Asset Manager and copying


I'm posting an answer instead of marking this as a duplicate because technically, you're asking for more details than are provided in the question/answer I'm going to link here. So, to answer the first of your 4 points, see Obtaining the name of an Android APK using C++ and the NativeActivity class.

As for checking to see if the SD card is mounted, that should be rather simply. Simply attempt to open the directory or a file on the SDcard (that you know should be there) and if it fails, you know the SD card is not available. See What's the best way to check if a file exists in C? (cross platform).


You may want to have a look at "Expansion Files" see APK Expansion Files.

As far is i understand this, this gives you a system that automatically puts resource files (your expansion file) on the "shared storage location".

So i think that this would solve your problem of duplicated data.

There is also a short introduction post on the android-developers blog.