
Untitled
By: a guest on
Aug 7th, 2012 | syntax:
None | size: 0.71 KB | hits: 9 | expires: Never
Android catch app crash
// Ceck if the app crashed last time
if(this.getIO().readPrimitiveInternalMemoryBoolean(FileNames.SpaceDroid.CrashReport) == true) {
this.getGameLog().d(classTAG, "App crashed last time");
}
else {
this.getGameLog().d(classTAG, "App didn't crash last time");
}
// Flag the app as chrashed and when the app is exited, then mark it as false.
this.getIO().writePrimitiveInternalMemory(FileNames.SpaceDroid.CrashReport, true);
@Override
public void onDispose() {
super.onDispose();
this.getIO().writePrimitiveInternalMemory(FileNames.SpaceDroid.CrashReport, false);
}