Package 

Class BacktraceANRHandlerWatchdog

  • All Implemented Interfaces:
    backtraceio.library.anr.BacktraceANRHandler , java.lang.Runnable

    
    public class BacktraceANRHandlerWatchdog
    extends Thread implements BacktraceANRHandler
                        

    This is the class that is responsible for monitoring the user interface thread and sending an error if it is blocked

    • Method Summary

      Modifier and Type Method Description
      void setOnApplicationNotRespondingEvent(OnApplicationNotRespondingEvent onApplicationNotRespondingEvent)
      void run() Method which is using to check if the user interface thread has been blocked
      void stopMonitoringAnr()
      • Methods inherited from class java.lang.Thread

        activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, onSpinWait, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, start, stop, suspend, toString, yield
      • Methods inherited from class backtraceio.library.anr.BacktraceANRHandler

        setOnApplicationNotRespondingEvent
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BacktraceANRHandlerWatchdog

        BacktraceANRHandlerWatchdog(BacktraceClient client)
        Initialize new instance of BacktraceANRWatchdog with default timeout
        Parameters:
        client - current Backtrace client instance which will be used to send information about exception
      • BacktraceANRHandlerWatchdog

        BacktraceANRHandlerWatchdog(BacktraceClient client, int timeout)
        Initialize new instance of BacktraceANRWatchdog without debugging
        Parameters:
        client - current Backtrace client instance which will be used to send information about exception
        timeout - maximum time in milliseconds after which should check if the main thread is not hanged
      • BacktraceANRHandlerWatchdog

        BacktraceANRHandlerWatchdog(BacktraceClient client, int timeout, boolean debug)
        Initialize new instance of BacktraceANRWatchdog
        Parameters:
        client - current Backtrace client instance which will be used to send information about exception
        timeout - maximum time in milliseconds after which should check if the main thread is not hanged
        debug - enable debug mode - errors will not be sent if the debugger is connected