How to send acra report in android when my variable = null

248 views Asked by At

I have an application that send me user_email = null when it shouldn't. I don't understant it, and can't reproduce it in local. I would like to use acra reporting to report system state when user_email = null.

I know how to write custom variable:

ACRA.getErrorReporter().putCustomData("myVariable", myVariable);

but I don't know how to generate report if var is null, even if the system doesn't crash ( in my case my null variable does not crash the system)

1

There are 1 answers

1
William On BEST ANSWER
if ( user_email == null) {
  ACRA.getErrorReporter().handleSilentException(null);
}

See https://github.com/ACRA/acra/wiki/AdvancedUsage#wiki-Sending_reports_for_caught_exceptions