To begin building an Android app, my first step would undoubtedly be to launch Android Studio 🤓, and it’s crucial to stay current with updates. What version of Android Studio are you presently using?
This blog post will focus on a thrilling feature available in Android Studio Flamingo Canary 5 and above, known as App Quality Insights (AQI), which can be located near the profiler in your studio. Personally, I have it positioned at the bottom, so let’s explore what it has in store.
Wow, Firebase is incredibly convenient for developers, and using it is much simpler than having to open it in a separate browser tab. With App Quality Insights, you can now access and handle all app’s crashlytics information directly within Android Studio.
Let’s just get started !!
To see Crashlytics data in Android Studio, you need to set up Firebase and Crashlytics in your app project. Here’s how: open the Firebase Assistant in Android Studio by going to Tools > Firebase, click Crashlytics, and then follow the tutorial to add Firebase and Crashlytics to your project. You can read more about the Firebase Assistant workflow in Firebase’s getting started guide for Android.
If you’ve already added Firebase and Crashlytics to your app, sign in to your Developer account in the IDE by clicking on the avatar icon. After you sign in, click on the App Quality Insights tool window. You should see the Issues, Sample Stack Trace, and Details panels populate with reports from Crashlytics.
Explore crashlytics data in Android Studio
The tool window for App Quality Insights contains extensive data that provides valuable insights into the events your users are experiencing. It also includes links that allow you to easily navigate to the sources of those events.
- In the event that your project contains several app modules, you can choose the specific module for which you wish to view event data. This can be done by accessing the drop-down menu, which lists all of the available modules
- In the case of having multiple apps, you can select the application ID that you want to analyze. This feature can be particularly beneficial when you need to differentiate between the production and debug versions of the app.
- The Issues panel shows the top events that Crashlytics has data for, and is sorted by your most impactful crashes
- The Sample Stack Trace panel provides comprehensive information about the most recent instance of the event you select in the Issues panel. It displays the event’s stack trace, and you can click on the trace to navigate to the relevant lines in your codebase, eliminating the need to switch back and forth between the console and the studio.
- Additionally, you can access information regarding the affected device type, its Android version, and the exact time the event occurred, along with a link to the event in the Firebase Crashlytics dashboard. The dashboard provides further insights into trends, custom logs, and additional stack traces, making it a valuable resource if you need to investigate the event more thoroughly.
- The Details panel breaks down the crash counts by device type and Android version, so you can determine which user groups are most affected. It also shows which app version(s) experienced the crash and the number of users affected.
- You can utilize the severity filters to select or exclude events classified as either Fatal or Non-Fatal. Moreover, you can narrow down your search to specific subsets of events by using the time range and app version filters.
Okie, this is all about what you can find in the App Quality Insights window, but this interesting stuff doesn’t end here. You can now navigate from the stack trace to code, you can also jump from code to stack trace.
Android Studio now annotates lines of code that are related to crashes with a crash gutter icon so you can easily spot and debug them.
By hovering over the crash icon, a pop-up will appear that displays the number of events involving that particular line of code, along with the event frequencies. For a more detailed list of events, including the frequency and number of users affected by a specific event, simply click on the crash icon. You can then select a particular event to access its details in the App Quality Insights tool window.
Don’t you think this integration is incredibly beneficial during the development process? I find it to be extremely helpful. I would love to hear your thoughts on the integration of Firebase with Android Studio.
Happy coding !!