If your class is an inactivity class and instantiating it from activiy, you can pass the context instance through the constructor from the following:
class YourNonActivityClass{
You can instantiate this class from an action as follows:
new YourNonActivityClass(this);
Suji Jul 29 '13 at 7:15 2013-07-29 07:15
source share