Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 7th, 2012  |  syntax: None  |  size: 0.71 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Android catch app crash
  2. // Ceck if the app crashed last time
  3.  
  4.  
  5.     if(this.getIO().readPrimitiveInternalMemoryBoolean(FileNames.SpaceDroid.CrashReport) == true) {
  6.                 this.getGameLog().d(classTAG, "App crashed last time");
  7.  
  8.             }
  9.             else {
  10.                 this.getGameLog().d(classTAG, "App didn't crash last time");
  11.  
  12.             }
  13.  
  14.             // Flag the app as chrashed and when the app is exited, then mark it as false.
  15.             this.getIO().writePrimitiveInternalMemory(FileNames.SpaceDroid.CrashReport, true);
  16.        
  17. @Override
  18.     public void onDispose() {
  19.         super.onDispose();
  20.         this.getIO().writePrimitiveInternalMemory(FileNames.SpaceDroid.CrashReport, false);
  21.  
  22.     }