Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Assets - "images", "sounds", and "webkit"?

Tags:

android

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.

like image 887
rich.e Avatar asked Jul 20 '11 11:07

rich.e


1 Answers

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.

like image 56
inazaruk Avatar answered Dec 02 '22 14:12

inazaruk