Is there a reason why the 'this' keyword only works in my apps main java file onCreate method?
If I try and use 'this' anywhere else, I eventually end up with a nullPointerException error.
For example, working version:
public class HelloAndroid extends Activity {
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
XmlParser xmlParse = new XmlParser();
encounterText = xmlParse.parseXML(this);
}
But if I try and use 'this' in separate java class file within my app, I get the NPE.
Thanks