Where to get Context from standalone native application?
A standalone native application should perform calls to Java VM. Creating VM and playing with classes seem to be OK, but there is a problem while obtaining instance of Context. I can not create Application object and use it (NullPointerException is thrown). Also, Context class is abstract and can not be instantiated. So开发者_StackOverflow中文版, where can I get the Context object?. Thanx.
Activity extends Context, so your Activity IS a Context.
精彩评论