Search code examples
firebasefirebase-crash-reporting

Firebase Android Crash Reporting


I'm using 'Firebase Android Crash Reporting' and can't make scenario when crash happens and we don't need to manually send it.

So I should 'log' or 'report' something manually all the time I think there could be Exception?

Like 'Fabric' works. Is there any chance to achieve that?


Solution

  • Firebase Crash Reporting automatically reports all uncaught exceptions. So if you let exceptions "bubble up", they'll show up in Firebase automatically.

    If your code already catches/handles/swallows exceptions, you can pass those exceptions on to Firebase. An example from the reference documentation:

    try {
         // Some code here...
     } catch (Exception e) {
         // Don't know what to do with this...
         FirebaseCrash.log("Caught an unexpected exception while doing some work");
         FirebaseCrash.report(e);
     }