If you are not going to use google alpha/beta testing then you will surely face issues in getting error logs from client. There are many android devices with different android api in market and testing your app on each device is really a tough job. Using Firebase Crash Reporting you can get all crash logs with required details to fix errors, in this tutorial we will discuss how to use Google Firebase for android crash reporting.
Open Firebase Console
Create New project, Now click on add firebase to android
Enter your project package name and optional signing certificate.
It will create google-services.json file Move it into your Android app module root directory.
Add following code:
In Project-level build.gradle (<project>/build.gradle):
// Add this line
In App-level build.gradle (<project>/<app-module>/build.gradle):
// Add to the bottom of the file
apply plugin: 'com.google.gms.google-services'
Add following in In App-level build.gradle
Now sync your project
Now throw exception to record it on firebase interface.
Use following code in your activity to throw exception:
FirebaseCrash.report(new Exception("iCodersLab.com : My first Android non-fatal error"));
Here is my first error that logged on Firebase console.
On Error click you can see it’s details, like android api, device name etc