Analysis of app crashes

AppMetrica does not conflict with other libraries that collect and process app crashes. If you use such libraries, initialize AppMetrica after installing these libraries.

Note.

The library does not symbolicate or deobfuscate app crashes. These operations are performed on the server or on the client side.

For automatically collecting information about app crashes, AppMetrica uses the standard handler Thread.UncaughtExceptionHandler. If you are using an app crash handler directly inside the app, use the following example of implementing correct data handling:

Thread.UncaughtExceptionHandler mAndroidCrashHandler = Thread.getDefaultUncaughtExceptionHandler();

private final Thread.UncaughtExceptionHandler mUncaughtExceptionHandler = new Thread.UncaughtExceptionHandler() {

        @Override
        public void uncaughtException(Thread thread, Throwable exception) {
            try {
                // Put your logic here.
            } finally {
                // Give to the system.
                if (null != mAndroidCrashHandler) {
                    mAndroidCrashHandler.uncaughtException(thread, exception);
                }
            }
        }

    };

    Thread.setDefaultUncaughtExceptionHandler(mUncaughtExceptionHandler);

This way you handle the exception yourself, then pass it on, and AppMetrica can send information about it.

If you want to transmit additional information about an app crash, use this example up to initializing the library in the app.