Sending user data using ACRA without sending the exception itself

Is it possible to send user data using acra without actually having a Throwable?

I saw that you can add custom crashdata using

ACRA.getErrorReporter().putCustomData()

But data will only be sent if an exception occurs.

The intention is to make this an application I'm working on that uses web browsing and I want to send Javascript errors as well as my own.

+3
source share
1 answer

I just found a way, you just need to specify null as a parameter instead of an Exception, for example:

ACRA.getErrorReporter().putCustomData("myKey", "myValue");
ACRA.getErrorReporter().handleException(null);

These two lines report this error:

java.lang.Exception: Report requested by developer

Composing the following data in the report:

{myKey:myValue} 
+9
source

All Articles