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.
Download APK
Code for crash report of ApertiumActivity.java
//Saving and setting crash happen flag Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler() { @Override public void uncaughtException(Thread t, Throwable e) { Translator.clearCache(); String error = e.getMessage(); Log.e("Error", error); appPreference.ReportCrash(error); progressDialog.dismiss(); thisActivity.finish(); android.os.Process.killProcess(android.os.Process.myPid()); } });
Follow on GitHub
See source CodeDownload APK
No comments:
Post a Comment