Package fi.bitwards.service
Class BitwardsService.Debug
java.lang.Object
fi.bitwards.service.BitwardsService.Debug
- Enclosing class:
BitwardsService
BitwardsService.Debug class is used to setup error reporting.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final StringgetErrorString(int errorCode) Get textual representation (error string) of the error codestatic voidSend an error report to Bitwards if error reporting has been enabled.static voidsendErrorReport(String message) Send an error report to Bitwards if error reporting has been enabled.static voidSend an error report for an exception to Bitwards if error reporting has been enabled.static voidsendErrorReport(Properties properties) Send an error report with additional properties to Bitwards if error reporting has been enabled.static voidsetErrorReporting(boolean enable) Set whether you want errors that occurred in SDK operation to be sent to Bitwards.
-
Constructor Details
-
Debug
public Debug()
-
-
Method Details
-
setErrorReporting
public static void setErrorReporting(boolean enable) Set whether you want errors that occurred in SDK operation to be sent to Bitwards. By default it is turned off. Note that these reports may contain Android logs. In addition, the Bitwards error reporting URI needs to be setup with your project, please contact Bitwards to obtain instructions how to do it.When error reporting is enabled, the SDK will also show a notification to the user when a crash occurs. The notification is only shown when error reporting is enabled.
- Parameters:
enable- true if you want error reporting to be enabled
-
sendErrorReport
public static void sendErrorReport()Send an error report to Bitwards if error reporting has been enabled. To enable error reporting, usesetErrorReporting(boolean). -
sendErrorReport
Send an error report to Bitwards if error reporting has been enabled. To enable error reporting, usesetErrorReporting(boolean).- Parameters:
message- the message
-
sendErrorReport
Send an error report with additional properties to Bitwards if error reporting has been enabled. To enable error reporting, usesetErrorReporting(boolean).- Parameters:
properties- the properties to be added to the error report.
-
sendErrorReport
Send an error report for an exception to Bitwards if error reporting has been enabled. To enable error reporting, usesetErrorReporting(boolean).- Parameters:
t- the throwable to send the error report on
-
getErrorString
Get textual representation (error string) of the error code- Parameters:
errorCode- the error code- Returns:
- the error string
-