Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Firebase Crash Reporting in Android

9ab0b3b080e75e0c03a0c643333f8b93?s=47 Segun Famisa
September 22, 2016

Firebase Crash Reporting in Android

9ab0b3b080e75e0c03a0c643333f8b93?s=128

Segun Famisa

September 22, 2016
Tweet

Transcript

  1. Firebase Crash Reporting in Android September, 2016 Sub-Saharan Africa Series,

    Lagos
  2. Segun Famisa (SF) Software Engineer at Konga segunfamisa.com @segunfamisa +OluwasegunFamisa

  3. Outline 1. What’s crash reporting? Why should I care? 2.

    Why should I use Firebase Crash Reporting? 3. How do I setup Firebase Crash Reporting? 4. How do I report my first crash? 5. Protips.
  4. What’s crash reporting? Why should I care?

  5. Why should you care about crash reporting? • App release

    is NOT the end of the development lifecycle • There will always be bugs • Bad reviews • Ratings matter Source: Wikimedia
  6. Why should you care about crash reporting? • App release

    is NOT the end of your development lifecycle • There will always be bugs • Bad reviews • Ratings matter Unless you’re this guy
  7. Why should you care about crash reporting? • App release

    is NOT the end of your development lifecycle • There will always be bugs • Bad reviews • Ratings matter Or this guy
  8. Why should you care about crash reporting? • App release

    is NOT the end of your development lifecycle • There will always be bugs • Bad reviews • Ratings matter Or Jon Skeet
  9. Why should you care about crash reporting? • App release

    is NOT the end of your development lifecycle • There will always be bugs • Bad reviews • Ratings matter You definitely don’t want this kind of reviews
  10. Why should you care about crash reporting? • App release

    is NOT the end of your development lifecycle • There will always be bugs • Bad reviews • Ratings matter
  11. Why should you care about crash reporting? • App release

    is NOT the end of your development lifecycle • There will always be bugs • Bad reviews • Ratings matter
  12. What crash reporting will do for you. • Detect crashes

    & errors • Detailed stack traces • Fix errors • Improve app quality • Happy users Detect crashes & errors Improve app quality Happy users!
  13. Introducing Firebase Crash Reporting

  14. Firebase Crash Reporting First introduced at Google IO, 2016 as

    part of the movement to create a unified app platform for mobile developers
  15. Firebase Crash Reporting Monitor fatal and non-fatal errors in your

    app
  16. Firebase Crash Reporting Integrate easily with analytics and other services

    in the Firebase suite
  17. Firebase Crash Reporting Crash reporting is Free & Easy to

    setup
  18. How do I setup Firebase crash reporting in Android?

  19. Requirements Android Studio >= 1.5 Android Device running Play services

    >= 9.0
  20. 1. Create/import project to console a. Create/import b. Download config

    file 2. Add Firebase to your app a. Add google-services classpath b. Apply google-services plugin 3. Add Firebase crash reporting 1. Create/import Project
  21. 1. Create/import Project 1. Create/import project to console a. Create/import

    b. Download config file 2. Add Firebase to your app a. Add google-services classpath b. Apply google-services plugin 3. Add Firebase crash reporting
  22. 2. Add Firebase to your app 1. Create/import project to

    console a. Create/import b. Download config file 2. Add Firebase to your app a. Add google-services classpath b. Apply google-services plugin 3. Add Firebase crash reporting Sample project: https://goo.gl/V8e7QQ
  23. 2. Add Firebase to your app 1. Create/import project to

    console a. Create/import b. Download config file 2. Add Firebase to your app a. Add google-services classpath b. Apply google-services plugin 3. Add Firebase crash reporting Sample project: https://goo.gl/V8e7QQ
  24. 3. Add Firebase crash reporting 1. Create/import project to console

    a. Create/import b. Download config file 2. Add Firebase to your app a. Add google-services classpath b. Apply google-services plugin 3. Add Firebase crash reporting Sample project: https://goo.gl/V8e7QQ
  25. How do I report my first crash?

  26. None
  27. Report your first crash Errr. Nvm, Firebase does that for

    you. No need to write any code to do that
  28. What’s more?

  29. 1. Reporting non-fatal exceptions You can also report non-fatal/handled exceptions,

    for tracking purposes.
  30. 2. Custom logs Logs can be useful in determining what

    user actions led to a crash. Firebase does well to include that as part of the error. Firebase allows you to log to logcat or onto firebase directly
  31. 2. Custom logs

  32. 3. Error clusters Firebase groups errors in clusters, by similar

    stack traces and severity
  33. 4. Upload proguard mappings Firebase allows you upload your mappings.txt

    file to map proguarded crash logs.
  34. 5. Protip - Handling reporting for development & production. Little

    Problem. Firebase doesn’t allow you to enable or disable crash reporting.
  35. 5. Protip - Handling reporting for development & production. How

    to disable Firebase crash reporting for dev build? You can’t. For now.
  36. 5. Protip - Handling reporting for development & production. Here’s

    what you can do instead: Create dev and prod flavours for development and production builds.
  37. 5. Protip - Handling reporting for development & production. Create

    another app on the console for dev build. Add the google-services.json to the project app/src/<build-flavour>/google-services.json
  38. Firebase crash reporting is in beta Submit bug reports, or

    feature requests https://firebase.google.com/support/contact/bugs-features/
  39. Resources & references • https://firebase.google.com/docs/crash/ • https://firebase.google.com/docs/crash/android • https://segunfamisa.com/posts/firebase-crash-reporting (Plug)

    • Firebase Android Tutorials playlist on YouTube • Demo project: https://github.com/segunfamisa/firebase-crash-demo
  40. Thank you! Sub-Saharan Africa Series, Lagos segunfamisa.com @segunfamisa +OluwasegunFamisa