Fabric is crooked again.

Error as like NullPointer and nothing comes to the server.

How do i wrap the entire application all Acitvity in Crashlictys.loge? in oncreate write try catch after in onresume, destroy is shorter in all functions of each class or what?

  • Well, tell me. Any suggestions? - Andro

1 answer 1

If it is possible to forcefully send error messages, then you can try to respond to all errors in this way and manually send a message.

It is necessary to register it in onCreate:

Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler() { Thread.UncaughtExceptionHandler oldHandler=Thread.getDefaultUncaughtExceptionHandler(); @Override public void uncaughtException(Thread thread, Throwable ex) { Log.e(LOG, "Ошибка поймана"); //здесь делаем то, что хотели сделать в onPause, но не успели, т.к. упали. //Если используем какую-либо либу, обрабатывающую ошибки //ACRA, например, то надо вызвать дальнейшую обработку ошибки //дефолтным обработчиком //Также это надо вызвать чтобы падение по ошибке со стандартным диалогом не завершилось ANR вместо него. if(oldHandler!=null) { oldHandler.uncaughtException(thread, ex); } } });