Assets - "images", "sounds" and "web kit"?

I am trying to get recursively loading all the assets that I placed in the "assets" folder in my project. When I do the following:

AssetManager assetManager = getResources().getAssets(); String assets[] = assetManager.list(""); 

and check which lines were loaded into the asset array, I found that I placed in the specified folder, as well as the lines “images”, “sounds” and “web kit”. Does anyone know why this is?

For reference (I still don’t know if this is applicable) my assets are zip files that contain full html pages that I use to upload to WebViews.

+7
source share
3 answers

I also noticed this. Here are some of the assets that are placed in these 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 the system uses these assets to be present in all .apk files. But instead of creating them (which would increase the size of all .apk files), Android mimics them through the API.

In addition, as a side effect, you can override these assets with any custom asset that has the same name as the built-in one. Not that it was too useful, but it is possible.

+6
source

I had this problem and I suggest you check out a couple of things:

  • The directory name is written in English. \ P
  • you have only one directory at the root of your resources (in this one directory you can insert a couple of drectories).
    , eg:
    assets->app->image , assets->app->another dir.
    in this example, the app dir directory is the only one in the assete root directory.
0
source

In my case, I created a folder with resources in the "app" directory of the project (app → assets), and the files uploaded to this "assets" folder were not read by AssetsManager. Then I right-clicked on the “application” folder → New → Folder → Asset Folder (location “main”), and everything was decided. The problem was where the "assets" folder was created.

0
source

All Articles