I'm trying to use openFileOutput
from a class which is not Activity class. When I'm writing something following, it gives me null pointer exception-
try {
Context con = null;
fosCAM = con.openFileOutput(camFile, Context.MODE_PRIVATE);
} catch (FileNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
Can anyone help me please?