Class BitwardsService.Debug

java.lang.Object
fi.bitwards.service.BitwardsService.Debug
Enclosing class:
BitwardsService

public static final class BitwardsService.Debug extends Object
BitwardsService.Debug class is used to setup error reporting.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static final String
    getErrorString(int errorCode)
    Get textual representation (error string) of the error code
    static void
    Send an error report to Bitwards if error reporting has been enabled.
    static void
    Send an error report to Bitwards if error reporting has been enabled.
    static void
    Send an error report for an exception to Bitwards if error reporting has been enabled.
    static void
    Send an error report with additional properties to Bitwards if error reporting has been enabled.
    static void
    setErrorReporting(boolean enable)
    Set whether you want errors that occurred in SDK operation to be sent to Bitwards.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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, use setErrorReporting(boolean).
    • sendErrorReport

      public static void sendErrorReport(String message)
      Send an error report to Bitwards if error reporting has been enabled. To enable error reporting, use setErrorReporting(boolean).
      Parameters:
      message - the message
    • sendErrorReport

      public static void sendErrorReport(Properties properties)
      Send an error report with additional properties to Bitwards if error reporting has been enabled. To enable error reporting, use setErrorReporting(boolean).
      Parameters:
      properties - the properties to be added to the error report.
    • sendErrorReport

      public static void sendErrorReport(Throwable t)
      Send an error report for an exception to Bitwards if error reporting has been enabled. To enable error reporting, use setErrorReporting(boolean).
      Parameters:
      t - the throwable to send the error report on
    • getErrorString

      public static final String getErrorString(int errorCode)
      Get textual representation (error string) of the error code
      Parameters:
      errorCode - the error code
      Returns:
      the error string