Juliatzin
Juliatzin

Reputation: 19695

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

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)

Upvotes: 0

Views: 249

Answers (1)

William
William

Reputation: 20196

if ( user_email == null) {
  ACRA.getErrorReporter().handleSilentException(null);
}

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

Upvotes: 2

Related Questions