java.lang.Object | |
↳ | com.google.android.gms.analytics.ExceptionReporter |
Used to catch any uncaught exceptions and report them to Google Analytics.
This class will call dispatchLocalHits()
after calling
send(Map
.
The exact message reported is determined by the ExceptionParser
set
via the setExceptionParser(ExceptionParser)
method. See StandardExceptionParser
for an example of an implementation of ExceptionParser
.
All exceptions reported via this class will be reported as fatal exceptions.
Usage:
UncaughtExceptionHandler myHandler = new ExceptionReporter( myTracker, // Currently used Tracker. GAServiceManager.getInstance(), // GAServiceManager singleton. Thread.getDefaultUncaughtExceptionHandler(), // Current default uncaught exception handler. context); // Context of the application. // Make myHandler the new default uncaught exception handler. Thread.setDefaultUncaughtExceptionHandler(myHandler);
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
[Expand]
Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||||||||||||||||||||||||
![]() |
tracker | an active Tracker instance. Should not be null. |
---|---|
originalHandler | the current DefaultUncaughtExceptionHandler . |
context | the current app context. Should not be null. |