Plugins

Featured Plugins: Crash Reporting Tool for Android

The most advanced IDE for Java developers, IntelliJ IDEA, is also an open platform that is ideally suited for building of custom developer tools. From time to time we’ll be selecting one of many plugins created by the community to feature on our blog. Today we’re going to speak about Twitter’s tool for mobile crash reporting, and its implementation as IntelliJ IDEA plugin.

Crashlytics is a lightweight crash reporting tool for iOS and Android applications, that captures crashes and delivers nice and clean reports via email or Crashlytics.com cloud storage.

The plugin comes in a ZIP archive and can be added to your copy of IntelliJ IDEA via the usual File -> Settings -> Plugins -> Install plugin from disk dialog. After the plugin is installed, you should see a red Crashlytics icon on the toolbar.

To start using Crashlytics, just add an Android project to the Crashlytics dashboard:

Crashlytics will then automatically make some minor alterations to the code that enable it to function, including the modification of manifest file to request permissions to access the Internet and add metadata to track your account on the Crashlytics server, and the changes to onCreate method that actually start Crashlytics.

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Crashlytics.start(this);

   // Other code here
}

As you can see, call to the Crashlytics.start method is placed exactly after the the call to the base onCreate method, which is essential for Crashlytics to function properly. Any other code you may need to run in onCreate should be placed after it. Needless to say, plugin also takes care of any import statements that are required.

When an unhandled exception occurs, all you typically get to look at is a stack trace, which is sometimes very lengthy and is difficult to read, and doesn’t always provide all the complete coverage of what was really going wrong with your application, which makes analysis harder that it should be. And this is the moment where Crashlytics comes to the rescue.

Crashlytics performs deep analysis of every thread, then intelligently organizes thousands of crashes from a variety of devices, distills them down to unique issues, and prioritizes the most critical crashes for you to fix. When done, it delivers a nice report that summarizes the key points right in your inbox, which gives you a lot clearer picture and enables you to more effectively deal with crashes and bugs.

That concludes today’s featured plugin article. Feel free to share your ideas about what plugins you would like to have featured, and we will write about them in the upcoming articles!

image description

Discover more