开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜