What is fabric?
Fabric is the new development kit developed by Twitter that provides a set of crash reporting and mobile analytics tools for mobile applications. Crashlytics is one of the tool provided by Fabric. Crashlytics is a very well-known crash reporting service that can track the crashes happened on your android application and a lots of statistical information and analytics.
What is firebase?
Firebase is a Google’s tool that serves as the developer backend. It is a mobile application development platform that helps developers to create high quality applications.
It has all the google’s strength wrapped all together into one platform having a single dashboard.
Features of Firebase:
- Crash Reporting
- Cloud Messaging
- Realtime Database
- Authentication and many more.
Eliminating crashes is crucial to improving user experience. Fabric and Firebase are stronger together now. Now we can use Crashlytics in Firebase. You can explore and integrate Firebase services in your application directly from Android Studio using the Assistant window.
Steps of using Firebase for crash reporting:
Step 1: Install the firebase.
Following are the steps to install firebase on your Android Studio Platform.
- Goto Tools > SDK Manager
- Click SDK Tools Tab.
- Check Google Repository checkbox, and click OK.
- Click OK to install the setup.
- Click Finish once the installation is complete.
If you have already installed the firebase then you can skip this step and directly jump to Step-2.
Step 2: Click Tools > Firebase to open the Assistant window.
Step 3: Click on “Analytics” feature and then click on the link labeled as “Log as Analytics Event”.
Step 4: Click the “Connect to Firebase” button.
A window will then popup asking you to choose between the new or existing firebase projects and also choosing the country from the dropdown list. After filling the details click “Connect to Firebase”.
Step 5: You can now see that your application is connected to the firebase. Next thing you’ve to do is add analytics to your application. For that click on the “Add Analytics to your App” button.
Click on “Accept Changes” button from the popup to add the analytics to your application.
Step 6: Install the Fabric if you haven’t yet. The following link contains step-by-step installation process of Fabric into Android Studio.
Step 7: Next step is to integrate the Fabric to your application. To do so click on the “New App” button.
Step 8: You will then see the window having the title “Add Crashlytics to your project”. Click on the “Apply” button on the bottom right of the screen to proceed using Crashlytics.
Step 9: You can now see your project in Firebase and Fabric platform.
Step 10: Next go to the firebase platform to setup Crashlytics to your application.
As we already have Fabric setup we will select the second option to link the Crashlytics to our application.
Next to link your application to Fabric click on “Link app in Fabric” button.
Link to the Firebase with your email ID by click on the “Get Started” button.
To see the list of projects in your Firebase now click on the “See Projects” link.
Manually drag and drop the project on the Firebase board to link your project to the Firebase.
Click on the “Link 1 app to Firebase” button. And you are done. You can now see the list of projects that are successfully linked.