Google Analytics Crash Report Only Shows First Line Of Stacktrace
My application uses Google Analytics to track exceptions and crashes (among other thigs). I use this function to get the stacktrace: public static void sendErrorReportViaGoogleAnal
Solution 1:
Just faced with this problem. Simply paste the given code to BaseApplication.onCreate() method of your project or to other place to set the custom ExceptionReporter for uncaught exceptions. And don't forget to declare the given flag in analytics.xml.
<bool name="ga_reportUncaughtExceptions">true</bool>
Custom uncaught exceptions reporter:
ExceptionReporter myHandler =
newExceptionReporter(EasyTracker.getInstance(this), GAServiceManager.getInstance(),
Thread.getDefaultUncaughtExceptionHandler(), this);
StandardExceptionParser exceptionParser =
newStandardExceptionParser(getApplicationContext(), null) {
@OverridepublicStringgetDescription(String threadName, Throwable t) {
return"{" + threadName + "} " + Log.getStackTraceString(t);
}
};
myHandler.setExceptionParser(exceptionParser);
// Make myHandler the new default uncaught exception handler.Thread.setDefaultUncaughtExceptionHandler(myHandler);
Solution 2:
Since you didn't describe what you actually did in order to catch the crashes then I can only send you to the docs: https://developers.google.com/analytics/devguides/collection/android/v2/exceptions
If you are using EasyTracker you can declare:
<bool name="ga_reportUncaughtExceptions">true</bool>
otherwise you can implement the ExceptionReporter class as described and attach it to your thread.
Post a Comment for "Google Analytics Crash Report Only Shows First Line Of Stacktrace"