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. Uses ACRA for error report handling.
  • 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 final void
    initializeACRA(android.content.Context context, Class buildConfigClazz)
    Setup application crash reporting if needed.
    final boolean
    Check if ACRA has been initialized.*
    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

    • initializeACRA

      public static final void initializeACRA(android.content.Context context, Class buildConfigClazz)
      Setup application crash reporting if needed. Crash report will be sent to Bitwards. Uses ACRA to the crash reporting. Note that it is not required to be setup and application developers may use their own crash reporting tool.
      Parameters:
      context - the context
      buildConfigClazz - BuildConfig.class
    • 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.
      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
    • isInitialized

      public final boolean isInitialized()
      Check if ACRA has been initialized.*
      Returns:
      true if ACRA has been initialized, false if not.
    • 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