Package 

Class BacktraceBreadcrumbs

    • Constructor Detail

      • BacktraceBreadcrumbs

        BacktraceBreadcrumbs(String breadcrumbLogDirectory)
    • Method Detail

      • enableBreadcrumbs

         boolean enableBreadcrumbs(Context context)

        Enable logging of breadcrumbs and submission with crash reports

        Parameters:
        context - context of current state of the application
      • enableBreadcrumbs

         boolean enableBreadcrumbs(Context context, EnumSet<BacktraceBreadcrumbType> breadcrumbTypesToEnable)

        Enable logging of breadcrumbs and submission with crash reports

        Parameters:
        context - context of current state of the application
        breadcrumbTypesToEnable - a set containing which breadcrumb types to enable
      • enableBreadcrumbs

         boolean enableBreadcrumbs(Context context, int maxBreadcrumbLogSizeBytes)

        Enable logging of breadcrumbs and submission with crash reports

        Parameters:
        context - context of current state of the application
        maxBreadcrumbLogSizeBytes - breadcrumb log size limit in bytes, should be a power of 2
      • enableBreadcrumbs

         boolean enableBreadcrumbs(Context context, EnumSet<BacktraceBreadcrumbType> breadcrumbTypesToEnable, int maxBreadcrumbLogSizeBytes)

        Enable logging of breadcrumbs and submission with crash reports

        Parameters:
        context - context of current state of the application
        breadcrumbTypesToEnable - a set containing which breadcrumb types to enable
        maxBreadcrumbLogSizeBytes - breadcrumb log size limit in bytes, should be a power of 2
      • setCurrentBreadcrumbId

         void setCurrentBreadcrumbId(long breadcrumbId)

        NOTE: This should only be used for testing

        Parameters:
        breadcrumbId - Will force set the current breadcrumb ID
      • getCurrentBreadcrumbId

         long getCurrentBreadcrumbId()

        Get the current breadcrumb ID (exclusive). This is useful when breadcrumbs are queued andposted to an API because in the meantime before the breadcrumbs are finally posted we mightget more breadcrumbs which are not relevant (because they occur after queueing up thebreadcrumb sender). Therefore it is useful to mark the breadcrumb sender with the mostcurrent breadcrumb ID at the time of queuing up the request to post the breadcrumbs.

      • addBreadcrumb

         boolean addBreadcrumb(String message)

        Add a breadcrumb of type "Manual" and level "Info" with the provided message string

      • addBreadcrumb

         boolean addBreadcrumb(String message, Map<String, Object> attributes)

        Add a breadcrumb of type "Manual" and level "Info" with the provided message string and attributes

      • isEnabled

         boolean isEnabled()

        Determinate if Breadcrumbs are enabled.