$30 off During Our Annual Pro Sale. View Details »

Firebase Crash Reporting in Android

Segun Famisa
September 22, 2016

Firebase Crash Reporting in Android

Segun Famisa

September 22, 2016
Tweet

More Decks by Segun Famisa

Other Decks in Programming

Transcript

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

    View Slide

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

    View Slide

  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.

    View Slide

  4. What’s crash reporting?
    Why should I care?

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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!

    View Slide

  13. Introducing Firebase
    Crash Reporting

    View Slide

  14. Firebase Crash Reporting
    First introduced at Google IO,
    2016 as part of the movement
    to create a unified app
    platform for mobile developers

    View Slide

  15. Firebase Crash Reporting
    Monitor fatal and non-fatal errors
    in your app

    View Slide

  16. Firebase Crash Reporting
    Integrate easily with analytics and
    other services in the Firebase
    suite

    View Slide

  17. Firebase Crash Reporting
    Crash reporting is Free & Easy to
    setup

    View Slide

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

    View Slide

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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  25. How do I report my first
    crash?

    View Slide

  26. View Slide

  27. Report your first crash
    Errr. Nvm, Firebase does that for you. No
    need to write any code to do that

    View Slide

  28. What’s more?

    View Slide

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

    View Slide

  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

    View Slide

  31. 2. Custom logs

    View Slide

  32. 3. Error clusters
    Firebase groups
    errors in clusters,
    by similar stack
    traces and severity

    View Slide

  33. 4. Upload proguard mappings
    Firebase allows you
    upload your mappings.txt
    file to map proguarded
    crash logs.

    View Slide

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

    View Slide

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

    View Slide

  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.

    View Slide

  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//google-services.json

    View Slide

  38. Firebase crash reporting is in
    beta
    Submit bug reports, or feature requests
    https://firebase.google.com/support/contact/bugs-features/

    View Slide

  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

    View Slide

  40. Thank you!
    Sub-Saharan Africa Series, Lagos
    segunfamisa.com
    @segunfamisa
    +OluwasegunFamisa

    View Slide