Analyzing crashes

Attention.

This is an archived version of documentation. You can find the current documentation for all platforms here.

AppMetrica doesn't 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.

To upload mapping files to AppMetrica, use the crash plugin. It automatically uploads the mapping and SO files when building an app. For more information, see uploading mapping files and debugging symbols on Android.

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);
Copied to clipboard

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.

If you didn't find the answer you were looking for, you can use the feedback form to submit your question. Please describe the problem in as much detail as possible. Attach a screenshot if possible.