I've implemented the following code to get crash details:
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread thread, Throwable ex) {
Log.e(TAG, "Uncaught Exception!");
StackTraceElement stackTraceElements[] = ex.getStackTrace();
}
});
The problem I'm facing is, let's say two exceptions occur, RuntimeException
which was caused by NullPointerException
. In the above method, I'm getting trace for only RuntimeException
.
What should I do to get entire the back trace?