For the More Curious: Non-Assets?

AssetManager has methods called openNonAssetFd(…). You might reasonably ask why a class dedicated to assets would concern itself with non-assets. We might reasonably answer, These aren’t the droids you’re looking for, so that you might go on believing that you never heard of openNonAssetFd(…) in the first place. There is no reason that we know of to ever use this method, so there is no real reason to learn about it. You did buy our book, though. So we might as well throw this answer out there for fun:

Earlier we said that Android has two systems, assets and resources. The resources system has a nice lookup system, but some resources are too big to fit inside that system. So these big resources – images and raw sound files, usually – are actually stored in the assets system. Under the hood, Android opens these things itself using the openNonAsset methods, not all of which are publicly available.

When would you need to use these? As far as we know, never. And now you know, too.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
34.227.112.145