How to get my activity context?

The Solution to How to get my activity context? is


Ok, I will give a small example on how to do what you ask

public class ClassB extends Activity
{

 ClassA A1 = new ClassA(this); // for activity context

 ClassA A2 = new ClassA(getApplicationContext());  // for application context. 

}

~ Answered on 2012-09-07 15:24:09


Most Viewed Questions: