I am trying to get recursively load all the assets I have placed within the "assets" folder within my project. When I do the following:
AssetManager assetManager = getResources().getAssets();
String assets[] = assetManager.list("");
and the check what strings were loaded into the assets array, I find the assets I have placed within the specified folder, along with the strings "images", "sounds", and "webkit". Does anyone know why this is?
For background information (don't yet know if it is applicable), my assets are zip files that contain complete html webpages, which I use to load into WebViews.
I also have noted this. Here are some assets that are placed in those directories:
webkit/play.png
webkit/nullPlugin.png
webkit/missingImage.png
webkit/android-weberror.png
sounds/bootanim1.raw
images/comobox-disabled.png
images/comobox-noHighlight.png
My guess is that system relies on this assets to be present in all .apk files. But instead of building them in (which would increase size of all .apk files), Android emulates them via asset API.
Also, as a side-effect, you can override this assets with any custom asset that has same name as built-in one. Not that this may be too useful, but this is possible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With