Android How to verify successful installation of ACRA emergency log

I followed the instructions for adding ACRA to my project as follows:

http://code.google.com/p/acra/wiki/BasicSetup

Besides waiting for an accident, how can I check if I configured everything correctly? Is there a way to get him to register some kind of success message? Or do I need to intentionally introduce an error that will cause it to fail?

+4
source share
5 answers

Just do int i = 10/0; in the constructor .: D

+7
source

Throw a RuntimeException .

throw new RuntimeException("Dying on purpose"); 

RuntimeException instances (and its subclasses) are not marked, so the compiler will not complain.

+15
source

If you just want to get a copy of the report, you can do the following ..... ACRA.getErrorReporter () handleSilentException (zero);

+3
source

Add this to your application launch code:

 throw new Exception("ACRA is alive!"); 
+2
source

In fact, the best way to prove that everything is set up correctly is to create an error to see if the report has actually been sent to you. ACRA is invented to send crash logs, so you should test it on failure. Just comment out a line of code to make your app crash, that's all. Hope this helps.

0
source

All Articles