Package 

Class BacktraceClient

  • All Implemented Interfaces:
    backtraceio.library.interfaces.Client

    
    public class BacktraceClient
    extends BacktraceBase
                        

    Backtrace Java Android Client

    • Constructor Detail

      • BacktraceClient

        BacktraceClient(Context context, BacktraceCredentials credentials)
        Initializing Backtrace client instance with BacktraceCredentials
        Parameters:
        context - application context
        credentials - credentials to Backtrace API server
      • BacktraceClient

        BacktraceClient(Context context, BacktraceCredentials credentials, List<String> attachments)
        Initializing Backtrace client instance with BacktraceCredentials
        Parameters:
        context - application context
        credentials - credentials to Backtrace API server
        attachments - File attachment paths to consider for reports
      • BacktraceClient

        BacktraceClient(Context context, BacktraceCredentials credentials, Map<String, Object> attributes)
        Initializing Backtrace client instance with BacktraceCredentials
        Parameters:
        context - application context
        credentials - credentials to Backtrace API server
        attributes - additional information about current application
      • BacktraceClient

        BacktraceClient(Context context, BacktraceCredentials credentials, Map<String, Object> attributes, List<String> attachments)
        Initializing Backtrace client instance with BacktraceCredentials
        Parameters:
        context - application context
        credentials - credentials to Backtrace API server
        attributes - additional information about current application
        attachments - File attachment paths to consider for reports
      • BacktraceClient

        BacktraceClient(Context context, BacktraceCredentials credentials, BacktraceDatabaseSettings databaseSettings)
        Initialize new client instance with BacktraceCredentials
        Parameters:
        context - context of current state of the application
        credentials - Backtrace credentials to access Backtrace API
        databaseSettings - Backtrace database settings
      • BacktraceClient

        BacktraceClient(Context context, BacktraceCredentials credentials, BacktraceDatabaseSettings databaseSettings, List<String> attachments)
        Initialize new client instance with BacktraceCredentials
        Parameters:
        context - context of current state of the application
        credentials - Backtrace credentials to access Backtrace API
        databaseSettings - Backtrace database settings
      • BacktraceClient

        BacktraceClient(Context context, BacktraceCredentials credentials, BacktraceDatabaseSettings databaseSettings, Map<String, Object> attributes)
        Initialize new client instance with BacktraceCredentials
        Parameters:
        context - context of current state of the application
        credentials - Backtrace credentials to access Backtrace API
        databaseSettings - Backtrace database settings
        attributes - additional information about current application
      • BacktraceClient

        BacktraceClient(Context context, BacktraceCredentials credentials, BacktraceDatabaseSettings databaseSettings, Map<String, Object> attributes, List<String> attachments)
        Initialize new client instance with BacktraceCredentials
        Parameters:
        context - context of current state of the application
        credentials - Backtrace credentials to access Backtrace API
        databaseSettings - Backtrace database settings
        attributes - additional information about current application
      • BacktraceClient

        BacktraceClient(Context context, BacktraceCredentials credentials, Database database)
        Initialize new client instance with BacktraceCredentials
        Parameters:
        context - context of current state of the application
        credentials - Backtrace credentials to access Backtrace API
        database - Backtrace database
      • BacktraceClient

        BacktraceClient(Context context, BacktraceCredentials credentials, Database database, List<String> attachments)
        Initialize new client instance with BacktraceCredentials
        Parameters:
        context - context of current state of the application
        credentials - Backtrace credentials to access Backtrace API
        database - Backtrace database
      • BacktraceClient

        BacktraceClient(Context context, BacktraceCredentials credentials, Database database, Map<String, Object> attributes)
        Initialize new client instance with BacktraceCredentials
        Parameters:
        context - context of current state of the application
        credentials - Backtrace credentials to access Backtrace API
        database - Backtrace database
        attributes - additional information about current application
      • BacktraceClient

        BacktraceClient(Context context, BacktraceCredentials credentials, Database database, Map<String, Object> attributes, List<String> attachments)
        Initialize new client instance with BacktraceCredentials
        Parameters:
        context - context of current state of the application
        credentials - Backtrace credentials to access Backtrace API
        database - Backtrace database
        attributes - additional information about current application
        attachments - File attachment paths to consider for reports
    • Method Detail

      • send

         void send(String message)

        Sending a message to Backtrace API

        Parameters:
        message - custom client message
      • send

         void send(String message, OnServerResponseEventListener serverResponseEventListener)

        Sending a message to Backtrace API

        Parameters:
        message - custom client message
        serverResponseEventListener - event callback that will be executed after receiving a response from the server
      • send

         void send(Throwable throwable)

        Sending an throwable to Backtrace API

        Parameters:
        throwable - current throwable
      • send

         void send(Throwable throwable, OnServerResponseEventListener serverResponseEventListener)

        Sending an throwable to Backtrace API

        Parameters:
        throwable - current throwable
        serverResponseEventListener - event callback that will be executed after receiving a response from the server
      • send

         void send(Throwable throwable, Map<String, Object> attributes, OnServerResponseEventListener serverResponseEventListener)

        Sending an throwable to Backtrace API

        Parameters:
        throwable - current throwable
        attributes - throwable attributes
        serverResponseEventListener - event callback that will be executed after receiving a response from the server
      • send

         void send(BacktraceReport report)

        Sending a Backtrace report to Backtrace API

        Parameters:
        report - current BacktraceReport
      • send

         void send(BacktraceReport report, OnServerResponseEventListener serverResponseEventListener)

        Sending a Backtrace report to Backtrace API

        Parameters:
        report - current BacktraceReport
        serverResponseEventListener - event callback that will be executed after receiving a response from the server
      • enableAnr

         void enableAnr()

        Start monitoring if the main thread has been blocked

      • enableAnr

         void enableAnr(int timeout)

        Start monitoring if the main thread has been blocked

        Parameters:
        timeout - maximum time in milliseconds after which should check if the main thread is not hanged
      • enableAnr

         void enableAnr(int timeout, OnApplicationNotRespondingEvent onApplicationNotRespondingEvent)

        Start monitoring if the main thread has been blocked

        Parameters:
        timeout - maximum time in milliseconds after which should check if the main thread is not hanged
        onApplicationNotRespondingEvent - event that will be executed instead of the default sending of the error information to the Backtrace console
      • enableAnr

         void enableAnr(int timeout, boolean debug)

        Start monitoring if the main thread has been blocked

        Parameters:
        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
      • enableAnr

         void enableAnr(int timeout, OnApplicationNotRespondingEvent onApplicationNotRespondingEvent, boolean debug)

        Start monitoring if the main thread has been blocked

        Parameters:
        timeout - maximum time in milliseconds after which should check if the main thread is not hanged
        onApplicationNotRespondingEvent - event that will be executed instead of the default sending of the error information to the Backtrace console
        debug - enable debug mode - errors will not be sent if the debugger is connected
      • disableAnr

         void disableAnr()

        Stop monitoring if the main thread has been blocked