I have implemented in my project the exception reporting feature of Google Analytics (Android SDK) described here :
https://developers.google.com/analytics/devguides/collection/android/v2/exceptions?hl=fr
I would like to use ExceptionParser as explained at the bottom of the page but I don't understand what they mean by :
// Where myParser represents your implementation of ExceptionParser.
ExceptionParser parser = new myParser(context);
What should I write in the myParser class ?? Why this class is not part of the Google Analytics SDK ?
Thanks !
Thanks !
I used Andy Res answer. My full getDescription method is :
They say that
ExceptionParser
is an interface and has only 1 method:getDescription(String threadName, Throwable t)
.So, to get the most relevant description of the exception you may create a new class that implements that interface and overrides
getDescription()
.Something like this:
(Note that I'm not sure that return type of
getDescription()
isString
. You should put the appropriate return type)