Interface CrashesListener

  • All Known Implementing Classes:
    AbstractCrashesListener

    public interface CrashesListener
    Interface for the crashes listener.
    • Method Detail

      • shouldProcess

        boolean shouldProcess​(ErrorReport report)
        Called from a worker thread to determine whether a crash report should be processed or not.
        Parameters:
        report - A crash report that will be sent.
        Returns:
        true if it should be processed and sent, otherwise false.
      • shouldAwaitUserConfirmation

        boolean shouldAwaitUserConfirmation()
        Called from UI thread to determine whether it should wait for user confirmation before sending crash reports.
        Returns:
        true if it requires to be confirmed by a user, otherwise false. If this method returns true, Crashes.notifyUserConfirmation(int) must be called by yourself.
      • getErrorAttachments

        java.lang.Iterable<ErrorAttachmentLog> getErrorAttachments​(ErrorReport report)
        Called from a worker thread to get additional information to be sent as separate ErrorAttachmentLog logs Attachments are optional so this method can also return null.
        Parameters:
        report - The crash report for additional information.
        Returns:
        instances of ErrorAttachmentLog to be sent for the specified error report.
      • onBeforeSending

        void onBeforeSending​(ErrorReport report)
        Called from UI thread right before sending a crash report. The callback can be invoked multiple times based on the number of crash reports.
        Parameters:
        report - The crash report that will be sent.
      • onSendingFailed

        void onSendingFailed​(ErrorReport report,
                             java.lang.Exception e)
        Called from UI thread when sending a crash report failed. The report failed to send after the maximum retries so it will be discarded and won't be retried.
        Parameters:
        report - The crash report that failed to send.
        e - An exception that caused failure.
      • onSendingSucceeded

        void onSendingSucceeded​(ErrorReport report)
        Called from UI thread when a crash report is sent successfully.
        Parameters:
        report - The crash report that was sent successfully.