Firebase Crash Reporting In Android

Firebase Crash Reporting enables you to collect detailed report of errors in your app. It allows you to get the reason of particular crash/error.

We have already discussed about Firebase Remote Config and Firebase Authentication in previous articles. Today we will discuss about Firebase Crash Reporting.

Crash is one of the famous reason why user uninstalls your app from device. As android is widely used OS , it is having different dimensions, screen size, API levels, densities and some vendors also customize default OS.

So it is always difficult for a developer to find a exact problem with particular device or OS version. It might be possible that some of your code will work on your device but won’t work with other devices.

You can even log your custom events with Firebase Crash Reporting.

Firebase Crash Report gives you the device details, performance data, user data, when error occurred and what kind of error it is.

All the errors will be arranged in a groups according to error types and number of occurrences.

Firebase Crash Reporting also gives you alert on registered email address whenever new crash occur.

Firebase Crash Reporting is free to use.

Setup Firebase Crash Reporting

Step 1 : Create a new project on Firebase Console. Enter you project name and select country, than click CREATE PROJECT

Firebase Authentication

Step 2 : After creation of project click on Add Firebase to your Android app. Enter package name, App nickname(optional) and SHA-1 key(optional) and click on ADD APP.

Firebase Authentication

Step 3 : You will receive google-services.json file, put it inside app/ folder of your project.

Firebase Authentication

Step 4 : Add dependency to your root level build.gradle file.

Step 5 : Add dependency to your app/module level build.gradle file.

Step 6 : Add plugin at the bottom of your app-level build.gradle file.

That’s it, you are done with Firebase Crash Reporting setup. Yes there is nothing else to do for developers. Neither java code nor XML code, now whenever there is any crash in device, you will see a report in Firebase Console.

Firebase Crash Reporting

It will take around 5-10 minutes to report a crash on Firebase Console.

You can even log your custom events with Firebase Crash Reporting.

This is how it will generate report for above Exception :

Firebase Crash Reporting

 

 

Firebase Authentication In Android
Firebase Realtime Database In Android