Git Product home page Git Product logo

crash-monitor's Introduction

Crash-monitor

Initially created as an application wrapper disabling system's Thread.UncaughtExceptionHandler and showing a UI in case of the app crashing. It has been now changed to a monitoring/reporting + trying to elegantly hide android crashes.

Crash Monitor Whenever the android app crashes callbacks are triggered and the application is restarted and the crash is sent to reporting server. On the basis of crash frequency, the user can decide what to do. Callback appRestart provides a parameter named isRestart stating if the app needs to be closed or crash UI should be shown to the user.

Adding to project

Disable system's uncaught exception handler Thread.setDefaultUncaughtExceptionHandler((thread, throwable) -> { //do noting }); Add CrashMonitor interface as an implementation to the main app's application class. Crash report and should app be restarted is send using crashReport(Throwable e) and appRestart(boolean isRestart, @NotNull Thread thread, @NotNull Throwable exception) Initialize CrashHandler class CrashHandler crashHandler = new CrashHandler(this); in main app's application class. Set crashHandler as the default uncaught exception handler Thread.setDefaultUncaughtExceptionHandler(crashHandler); Crash threshold can be set using changeCrashThresholdLimit(int crashThreshold) by default it is 2.

API monitor Network calls can also be tracked and are cached if implemented, which can also be sent to the reporting server as a crash log. Network tracking only supports retrofit implementations for now.

Adding to project

Add CustomInterceptor to OkHttpClient CustomInterceptor customInterceptor = new CustomInterceptor(); and builder.addInterceptor(customInterceptor);

crash-monitor's People

Contributors

rajansaumya avatar bardiaalavi-2020 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.