Awesome Features You Must Know in Android Studio Bumblebee
The latest stable release of Android Studio, interestingly named after an insect “Bumblebee” is 2021.1.1 with Android Gradle plugin (AGP) version 7.1.0. In this article, we are going to cover some of the most interesting features of this release.
Let’s start
Interactive Previews
Over the time, Android Studio has improved a lot in the preview tools. Until this point, Android Studio allows you to check the Vector Drawable’s previews with their states like enabled, focused etc. But now, you can also preview Animated Vector Drawables directly, along with how the animation will look like on a real device.
Jetpack Compose is the latest UI framework to create amazing UIs in Android. The Google team is pushing more and more work on Jetpack Compose and in terms of tooling, it is adding more design features like interactive previews. Oftentimes, you need to check the behavior of some specific Composable, but you have to deploy the whole app on an emulator or physical device and navigate to that particular screen over and over again. But now Android Studio allows you to check that particular Composable directly without the need to run it on the device through the interactive previews feature in Bumblebee. Here’s how it will look like.
Updated Device Picker
Android has become a very vast ecosystem of devices and is running on about 3 billion devices which are not only mobile phones, but there are tablets, watches, car entertainment systems, embedded devices and many more. These come in very different screen sizes and configurations, so developers have to often take care of that as well. To help with it, Android has introduced an updated version of Device picker tool that provides various numbers of popular screens listed out there, as you can easily preview, validate and edit your layouts according to the desired screen size.
New Device Manager
Another interesting feature in the new Bumblebee version is the New Device Manager panel. This makes it easier to manage the testing devices (virtual and physical) directly inside the IDE.
Simply select View -> Tool Windows -> Device Manager
, and it will show a panel on the right-side like the image below.
The Virtual tab allows you to create new virtual devices and also shows you the already created devices. This is probably something you are already aware of. But the interesting part is the Physical tab which allows you to connect your real device through ADB over WiFi to help you debug apps without need of any cables etc. Here’s how you can connect your physical devices wirelessly.
Note: This feature is only available for devices having Android 11 or later.
Apple Silicon Support Update
About a year ago, Android introduced the support for Apple Silicon (arm64) hardware and enabled the Emulator to support this new Architecture. The Bumblebee update brings the latest version of SDK platform tool v32.0.0 and build tools v32.1.0 which includes APPT. This removes the need of Rosetta binary translator to run your app on Apple Silicon hardware and increases the performance even more.
Network Inspection
The Network Inspection has been supported since the earlier versions of Android Studio through the Network Profiler panel.. But in Bumblebee this panel has been migrated to the App Inspection tool which is a lighter weight inspection tool as compared to the previous one. To use the new inspector, select View > Tool Windows > App Inspection
, then from the menu bar select Network Inspector
to get more info about the network calls app is making.
Inspect Jobs, Alarms, and Wakelocks
This is my favorite. Kotlin Coroutines has made asynchronous programming easier and simpler, but debugging those coroutines was a bit complicated and time-consuming. But in the Bumblebee update, Android team offers Inspect Jobs, Alarms, and Wakelocks
panel, which is basically designed to monitor background tasks, see how these tasks are being scheduled and how these tasks will be executed. In order to use, select View > Tool Windows > App Inspection
then from the menu bar select Background Task Inspector
to inspect jobs, workers etc.
There are some other interesting features like Jank Detection to detect the slowness and UI hanging of the apps, capture layout inspector snapshots, support of Compose semantics in layout Inspector, and many more. You can read about those features and more on the Android’s official announcement blog post on this link.
At the end, please Subscribe to my newsletter DroidUp to learn learn about the latest things, tips, and skills in Android development manually handcrafted and curated by Wajahat Karim.