Flutter™ plugin for Android Studio and IntelliJ using JxBrowser

Customer

Google LLC is a multinational technology company focusing on artificial intelligence, online advertising, search engine technology, cloud computing, computer software, quantum computing, e-commerce, and consumer electronics.

google.com
Organization size 182,502
Country International
Industry Technology

Challenge 

In the dynamic landscape of mobile app development, Google’s Flutter has emerged as a powerful platform for building natively compiled mobile, web, and desktop apps from a single codebase.

A Flutter plugin for IntelliJ and Android Studio allowed developers to build apps within their familiar IDE. However, the app debugging and performance review with Flutter DevTools was a bit confusing and tedious.

Flutter’s debugging and profiling suite opened in a separate browser window, making developers switch back and forth between the IDE and the browser when measuring and adjusting their app’s performance.

As one of the early ways to streamline this part of the development process, Google™ used to support two versions of Flutter DevTools — one they already had, based on web technologies, and another based on Java Swing, so that DevTools are embedded into IntelliJ Platform UI. Yet, they figured out that it is too labor-intensive, even for Google, for too little gain.

So, they started searching for a solution that could embed web content into a Java application.

Solution 

After exploring various options, such as Java Chromium™ Embedded Framework ( JCEF), the Google team ultimately chose JxBrowser, developed by TeamDev — a cross-platform library for the integration of Chromium-based web browser components into Java applications.

It was a good match for several reasons:

Web contentRich web content rendering
JxBrowser provided a reliable foundation for rendering and interaction with complex web content of the Flutter DevTools interface.
Cross-platformCross-platform compatibility
Integration into IntelliJ was meant to be a way to allow developers on any platform to create apps on Flutter. With JxBrowser, the Google team saved sufficient time and effort making DevTools accessible for developers across platforms, as the library of choice integrates with the native Chromium code on any OS out of the box.
SupportProven stability and expert support
JxBrowser was introduced in 2007 and since then has been working reliably in various environments, being constantly improved and supported by the engineering team with 20 years of experience in Java integration.

Results 

By employing JxBrowser as a part of the Flutter plugin, Google has managed to integrate Fluter DevTools into Android Studio and IntelliJ.

This greatly increased the ease and speed of the Flutter app development, reducing process complexity and delivering the app inspection and diagnosis tools as a part of an IDE UI.

The costs of supporting Flutter DevTools for the Google team were also optimized as the chosen solution allowed to serve web-based content across the desktop environments as well, thus eliminating the need to support duplicate UI for web and Java Swing-based versions.

DevTools in Android Studio

Preview of the Flutter Inspector tab in Android Studio.

With more than 1.5 million downloads, the Flutter plugin for IntelliJ has gained significant popularity among developers. Their need to conveniently debug and tune up their apps is addressed by the Flutter DevTools suite, brought to them with the help of JxBrowser.

Add Chromium web browser to your Java app.
Get started now