Wednesday, July 25, 2012

Apertium Android with crash detection

Some device doesn't have enough RAM to support cache feature for translation and hence get crashed due to Low Memory. At the time of crash, App report it to app preference and close itself gracefully. So in next run, advance feature like cache can be switched off.
Figure 1
Main screen with crash detection message 

Code for crash report of

     //Saving and setting crash happen flag
     Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler() {
            public void uncaughtException(Thread t, Throwable e) {
          String error = e.getMessage();
          Log.e("Error", error);

Follow on GitHub

See source Code
Download APK

No comments:

Post a Comment