In my activite's onCreate i have
public void onCreate() {
try
{
FIStream = super.openFileInput("4.png");
MyImagePort.load(FIStream);
FIStream.close();
FIStream = null;
} catch (FileNotFoundException e) {
Log.w("spriter","File not found");
} catch (IOException e) {
e.printStackTrace();
}
}
Which seems to work fine. But then my Activity Overrides onPause..
@Override
public void onPause(){
super.onPause();
DoAutoSave();
}
private void DoAutoSave() {
try {
FOStream = new FileOutputStream("\\sdcard\\spriter\\4.png");
} catch (FileNotFoundException e) {
e.printStackTrace();
}
MyImagePort.SetAutoSaveFileStream(FOStream);
}
The problem is, FOStream above never recieves a OutputStream and is always null. what am i doing wrong please