Android: how to obtain AssetManager without reference to Context?

Posted by ab11 on Stack Overflow See other posts from Stack Overflow or by ab11
Published on 2010-12-10T15:23:23Z Indexed on 2010/12/26 22:53 UTC
Read the original article Hit count: 158

Filed under:
|

I have a Class that needs to obtain a reference to it's application's AssetManager. This class does not extend any sort of android UI class, so it doesn't have a getContext() method, or anything similar. Is there some sort of static Context.getCurrentApplicationContext() type of method?

To clarify: my class is intended to be used like a library, for other applications. It has no associated AndroidManifest.xml or control over the context which is calling it.

© Stack Overflow or respective owner

Related posts about android

Related posts about context