Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fabric Crashlytics Android events sending

I'm using Fabric Crashlytics for Android and it's really a great engine, and notifies me whenever there's a crash (on both the dashboard and my emai), but what i want to know is that:

Can I send an event to the dashboard (or my email) when the app catches an exception (i.e can i send the exception.printStackTrace() whenever the app catches an exception)?

like image 800
Hussein M. Yassine Avatar asked Apr 03 '17 08:04

Hussein M. Yassine


2 Answers

Yes, you can.

https://docs.fabric.io/android/crashlytics/caught-exceptions.html

try {
    ...
} catch (Exception e) {
    Crashlytics.logException(e);
    // handle your exception here!
}
like image 84
Sergey Glotov Avatar answered Nov 15 '22 12:11

Sergey Glotov


If you want to log details of the error, see fabric doc

try
{
   // your code
}
catch(Exception e)
{
   Crashlytics.logException(e);
}
like image 36
Ogulcan Ucarsu Avatar answered Nov 15 '22 11:11

Ogulcan Ucarsu