-
- All Implemented Interfaces:
-
backtraceio.library.interfaces.Client
public class BacktraceClient extends BacktraceBase
Backtrace Java Android Client
-
-
Constructor Summary
Constructors Constructor Description BacktraceClient(Context context, BacktraceCredentials credentials)
Initializing Backtrace client instance with BacktraceCredentials BacktraceClient(Context context, BacktraceCredentials credentials, List<String> attachments)
Initializing Backtrace client instance with BacktraceCredentials BacktraceClient(Context context, BacktraceCredentials credentials, Map<String, Object> attributes)
Initializing Backtrace client instance with BacktraceCredentials BacktraceClient(Context context, BacktraceCredentials credentials, Map<String, Object> attributes, List<String> attachments)
Initializing Backtrace client instance with BacktraceCredentials BacktraceClient(Context context, BacktraceCredentials credentials, BacktraceDatabaseSettings databaseSettings)
Initialize new client instance with BacktraceCredentials BacktraceClient(Context context, BacktraceCredentials credentials, BacktraceDatabaseSettings databaseSettings, List<String> attachments)
Initialize new client instance with BacktraceCredentials BacktraceClient(Context context, BacktraceCredentials credentials, BacktraceDatabaseSettings databaseSettings, Map<String, Object> attributes)
Initialize new client instance with BacktraceCredentials BacktraceClient(Context context, BacktraceCredentials credentials, BacktraceDatabaseSettings databaseSettings, Map<String, Object> attributes, List<String> attachments)
Initialize new client instance with BacktraceCredentials BacktraceClient(Context context, BacktraceCredentials credentials, Database database)
Initialize new client instance with BacktraceCredentials BacktraceClient(Context context, BacktraceCredentials credentials, Database database, List<String> attachments)
Initialize new client instance with BacktraceCredentials BacktraceClient(Context context, BacktraceCredentials credentials, Database database, Map<String, Object> attributes)
Initialize new client instance with BacktraceCredentials BacktraceClient(Context context, BacktraceCredentials credentials, Database database, Map<String, Object> attributes, List<String> attachments)
Initialize new client instance with BacktraceCredentials
-
Method Summary
Modifier and Type Method Description void
send(String message)
Sending a message to Backtrace API void
send(String message, OnServerResponseEventListener serverResponseEventListener)
Sending a message to Backtrace API void
send(Throwable throwable)
Sending an throwable to Backtrace API void
send(Throwable throwable, OnServerResponseEventListener serverResponseEventListener)
Sending an throwable to Backtrace API void
send(Throwable throwable, Map<String, Object> attributes, OnServerResponseEventListener serverResponseEventListener)
Sending an throwable to Backtrace API void
send(BacktraceReport report)
Sending a Backtrace report to Backtrace API void
send(BacktraceReport report, OnServerResponseEventListener serverResponseEventListener)
Sending a Backtrace report to Backtrace API void
enableAnr()
Start monitoring if the main thread has been blocked void
enableAnr(AnrType anrType)
void
enableAnr(int timeout)
Start monitoring if the main thread has been blocked void
enableAnr(int timeout, OnApplicationNotRespondingEvent onApplicationNotRespondingEvent)
Start monitoring if the main thread has been blocked void
enableAnr(int timeout, boolean debug)
Start monitoring if the main thread has been blocked void
enableAnr(int timeout, OnApplicationNotRespondingEvent onApplicationNotRespondingEvent, boolean debug)
Start monitoring if the main thread has been blocked void
enableAnr(BacktraceANRSettings anrSettings)
void
enableAnr(AnrType anrType, BacktraceANRSettings anrSettings)
void
disableAnr()
Stop monitoring if the main thread has been blocked BacktraceANRHandler
initAnrHandler(AnrType anrType, BacktraceANRSettings backtraceANRSettings)
BacktraceANRHandler
createBacktraceAnrHandler(AnrType anrType, BacktraceANRSettings settings)
-
Methods inherited from class backtraceio.library.base.BacktraceBase
addAttribute, addAttribute, addBreadcrumb, addBreadcrumb, addBreadcrumb, addBreadcrumb, addBreadcrumb, addBreadcrumb, addBreadcrumb, addBreadcrumb, clearBreadcrumbs, crash, disableNativeIntegration, dumpWithoutCrash, dumpWithoutCrash, enableBreadcrumbs, enableBreadcrumbs, enableBreadcrumbs, enableBreadcrumbs, enableNativeIntegration, enableNativeIntegration, enableNativeIntegration, enableProguard, getAttributes, nativeCrash, send, sendInnerExceptions, sendSuppressedExceptions, setOnBeforeSendEventListener, setOnRequestHandler, setOnServerErrorEventListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
BacktraceClient
BacktraceClient(Context context, BacktraceCredentials credentials)
Initializing Backtrace client instance with BacktraceCredentials- Parameters:
context
- application contextcredentials
- credentials to Backtrace API server
-
BacktraceClient
BacktraceClient(Context context, BacktraceCredentials credentials, List<String> attachments)
Initializing Backtrace client instance with BacktraceCredentials- Parameters:
context
- application contextcredentials
- credentials to Backtrace API serverattachments
- 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 contextcredentials
- credentials to Backtrace API serverattributes
- 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 contextcredentials
- credentials to Backtrace API serverattributes
- additional information about current applicationattachments
- 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 applicationcredentials
- Backtrace credentials to access Backtrace APIdatabaseSettings
- 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 applicationcredentials
- Backtrace credentials to access Backtrace APIdatabaseSettings
- 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 applicationcredentials
- Backtrace credentials to access Backtrace APIdatabaseSettings
- Backtrace database settingsattributes
- 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 applicationcredentials
- Backtrace credentials to access Backtrace APIdatabaseSettings
- Backtrace database settingsattributes
- 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 applicationcredentials
- Backtrace credentials to access Backtrace APIdatabase
- 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 applicationcredentials
- Backtrace credentials to access Backtrace APIdatabase
- 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 applicationcredentials
- Backtrace credentials to access Backtrace APIdatabase
- Backtrace databaseattributes
- 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 applicationcredentials
- Backtrace credentials to access Backtrace APIdatabase
- Backtrace databaseattributes
- additional information about current applicationattachments
- 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 messageserverResponseEventListener
- 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 throwableserverResponseEventListener
- 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 throwableattributes
- throwable attributesserverResponseEventListener
- 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 BacktraceReportserverResponseEventListener
- 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 hangedonApplicationNotRespondingEvent
- 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 hangeddebug
- 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 hangedonApplicationNotRespondingEvent
- event that will be executed instead of the default sending of the error information to the Backtrace consoledebug
- enable debug mode - errors will not be sent if the debugger is connected
-
enableAnr
void enableAnr(BacktraceANRSettings anrSettings)
-
enableAnr
void enableAnr(AnrType anrType, BacktraceANRSettings anrSettings)
-
disableAnr
void disableAnr()
Stop monitoring if the main thread has been blocked
-
initAnrHandler
BacktraceANRHandler initAnrHandler(AnrType anrType, BacktraceANRSettings backtraceANRSettings)
-
createBacktraceAnrHandler
BacktraceANRHandler createBacktraceAnrHandler(AnrType anrType, BacktraceANRSettings settings)
-
-
-
-