Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Absolute last chance to log an exception and it's stack trace to logcat for an Android app.
public class MyApplication extends MultiDexApplication {
public void onCreate() {
if(BuildConfig.DEBUG) {
final Thread.UncaughtExceptionHandler handler = Thread.getDefaultUncaughtExceptionHandler();
(t, e) -> {;
handler.uncaughtException(t, e);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment