Search code examples
androidsenderacra

ACRA CustomSender ErrorHandling


So I implemented a custom sender for ACRA. Everything seems to be working neatly, however, I'm not sure what happens when it can't send the error report to my cloud solution?

As I understand it, ACRA usually stores everything if it cannot be sent and tries to resend it the next time it is initialized, but this way it doesn't know whether it was actually sent or not. Is it enough if I throw a ReportSenderException to indicate that the report has not been sent yet?


Solution

  • Is it enough if I throw a ReportSenderException to indicate that the report has not been sent yet?

    Yes. That is the intended usecase for this exception

    I'm not sure what happens when it can't send the error report to my cloud solution?

    If at least one sender fails, ACRAs RetryPolicy is queried. The default policy is to retry sending reports if all senders failed. In your case that means, if you throw a ReportSenderException, ACRA will try to send that report again.