Android Studio Physical Devices Mirroring
Physical Devices Mirroring! What a fantastic feature. As an iOS developer, I am very jealous of the latest screen mirroring feature of Android Studio.
What is the Physical Devices Mirroring in Android Studio?
Physical device mirroring in Android Studio refers to the ability to display and interact with a connected physical Android device (such as a smartphone or tablet) directly on your development machine. This allows you to test and debug your app on a real device without having to constantly transfer it between the device and your development machine. This feature provides a more accurate representation of how your app will run on a real device, and can help you identify and resolve issues more quickly.
How can we enable this feature?
Firstly we can enable on android studio from Preference > Experimental > Device Mirroring.
After the enabled in android studio, plug-in your usb/type-c cable to computer. After that you will see dropdown menu which is listed your real device. Chosee your real device from this dropdown.
After that you will see real device screen in android studio. Also you can clicked from there. That’s awesome.
I love this feature and i hope, apple will add as soon as possible this feature to Xcode.
To enable physical device mirroring in Android Studio, you can follow these steps:
- Connect your Android device to your development machine using a USB cable.
- Enable USB debugging on your device, usually found in the Developer Options section of the device’s settings.
- In Android Studio, open the “Device File Explorer” view by going to “View” > “Tool Windows” > “Device File Explorer”.
- You should see your connected device listed in the “Device File Explorer” view. Right-click on it and select “Start monitoring logcat”.
- Now, click on the “Run” button in Android Studio, or select “Run” > “Run app” from the menu. This will launch your app on the connected device.
- To view the app on your development machine, go to “View” > “Tool Windows” > “Android Monitor”. In the Android Monitor window, select “Debugger” and you should see your app displayed in the debugger.
Note: Make sure that your device is fully charged and connected properly to your development machine. Also, ensure that the USB drivers for your device are installed and working correctly on your machine.
Which devices supports this features?
Physical device mirroring is supported in Android Studio 4.2 and higher. To use this feature, you will need to have an Android device running Android 4.0 (Ice Cream Sandwich) or higher, and a development machine running a supported operating system such as Windows, macOS, or Linux.