Last time I wrote about how to get 100% code coverage on Kotlin nullable vars. This week I have a quick tidbit on how to run an app on multiple devices at once!
About a year ago, a coworker revealed a little-known secret — the window that appears in Android Studio when you want to run an app on a device supports multi-select! So, you can shift/command select multiple devices and the app would be installed/launched on all of them simultaneously — a very handy tool if you’re trying to debug something on multiple devices.
However, that was 2018, and now we have a new version of Android Studio, and this functionality is now available in a slightly different format. The new device menu in the toolbar has an option to “Run on multiple devices”:
Once you select that, you’ll get a pop-up window where you check a box next to each device you’d like to run the app on:
(It’s a little difficult to tell from this image, but there are different icons for physical devices vs. emulators)
Once you press the “Run” button, Android Studio will work its magic and install/launch the app on all of the devices you specified!
I hope this makes your life easier and please share this tidbit around — this feature is much more prominent in the UI now, but I imagine many people still don’t know it’s there. Do you have other favorite Android Studio features you find especially useful? Let me know in the comments below! And, please follow me on Medium if you’re interested in being notified of future tidbits.
This tidbit was originally delivered on August 22, 2018.