Firebase Crashlytics Android Example

Firebase Crashlytics is a lightweight, realtime crash reporter that helps you track, prioritize and fix stability issues that erode your app quality. Crashlytics saves you troubleshooting time by intelligently grouping crashes and highlighting the circumstances that lead up to them.

Prior to Firebase Crashlytics, Google offered Firebase Crash Reporting (FCR), for app crash monitoring and reporting. Although FCR did it's job (monitoring crashes) it was a hack and it has since been deprecated in favor of Crashlytics.

Reasons to use FIrebase Crashlytics over Firebase Crash Reporting

  1. Real time crash reporting : FCR could take up to 30 mins or more before an error could be reported (via email).
  2. Intuitive Dashboard Report interface : the dashboard of has been improved
  3. un-obfuscated stack trace: If you used Pro Guard or DexGuard to obfuscate your code, firebase crash reporting mandates the uploading of a "mappings.txt" file to the FCR console in order to decode stack trace. However, with Crashlytics, I bring you good news, there's no need to upload a "mapping.txt" file. Crashlytics supports ProGaurd and DexGuard and also ... wait for it...  Automatic deobfuscation of stack trace.

How to Add Crashlytics SDK to your App

1. Add your app to Firebase Console. Tools -> Firebase -> Add New Projecy

2. Add the code below to build.gradle(Module : app)

dependencies {
   implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'
   ...
}
apply plugin: 'io.fabric'

3. Add the code below to build.gradle(Project : AppName)
allprojects {
    repositories {
        ...
        maven {url 'https://maven.fabric.io/public'}
    }
}

4. click Sync Now and your all set

References
  • Firebase Crashlytics Documentation - Firebase
  • Getting the most out of Crashlytics - https://medium.com/fuzz/getting-the-most-out-of-crashlytics-380afb703876

Comments

Popular posts from this blog

How to select Multiple Item in RecyclerView in Android

Android Clipboard Listener - How to Know when User copies a text in Android

Kotlin ArrayList and Loops Example