Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I run the Android Emulator within (or on top of) the Android Studio window?

Tags:

I use Android Studio on macOS in full screen (maximised). When launching the Android Emulator, its window is shown on the regular desktop. This requires switching from one window to another. I'd like to be able to look at both windows at the same time, without leaving full screen mode in Android Studio.

Is there a way to move the Android Emulator window to within (or on top of) my Android Studio window?

like image 875
Erik Avatar asked Jul 17 '17 13:07

Erik


People also ask

How do I open an emulator window in Android Studio?

Run your app on the emulator After you have created an Android Virtual Device (AVD), you can start the Android Emulator and run an app in your project: In the toolbar, select the AVD that you want to run your app on from the target device drop-down menu. Click Run.

How do I open an Android Emulator in a separate window?

To enable the setting you have to visit the Tools > Emulator and then uncheck the "Launch in a tool window" option. By doing that your emulator will launch in a new separate window. Launch Android Emulator in a Separate Window. Hope this short snippet help and cheers!


2 Answers

With Android Studio 4.1 and above you can run the Android Emulator directly in Android Studio.

To run the emulator in Android Studio, make sure you're using Android Studio 4.1 with version 30.0.10 or higher of the Android Emulator, then follow these steps:

  1. Click File > Settings > Tools > Emulator (or Android Studio > Preferences > Tools > Emulator on macOS), then select Launch in a tool window and click OK.

  2. If the Emulator window didn't automatically appear, open it by clicking View > Tool Windows > Emulator.

  3. Start your virtual device using the AVD Manager or by targeting it when running your app.

For more info: Run the Android Emulator directly in Android Studio

Run the Android Emulator directly in Android Studio

like image 99
murgupluoglu Avatar answered Sep 27 '22 17:09

murgupluoglu


This is not a 100% answer, but near to it and since it doesn't fit in comments, I'll write it here. Hopefully we can turn it into a 100% answer.

It is possible to do this with applications that supports full screen mode. Unfortunately the Android emulator does not do this. Genymotion does.

There seem to be hacks to activate full screen mode for applications that don't support it natively. For example, for the iOS simulator, you have to run this on a terminal:

defaults write com.apple.iphonesimulator AllowFullscreenMode -bool YES 

A Google search returns several results to do this with the Android Emulator: https://www.google.com/search?q=how+to+run+android+emulator+full+screen&rlz=1C5CHFA_enDE822DE822&oq=how+to+run+android+emulator+full+screen&aqs=chrome..69i57.6269j0j9&sourceid=chrome&ie=UTF-8 I've not tested any of them, so that's left as an exercise to the reader. If you do successfully please write it in the comments (or directly edit this post with the steps).

It may also make sense to make a feature request on the emulator to enable full screen mode.

Once you have an emulator/simulator that supports full screen mode, you can use MacOS's split view feature. In order to do this:

  • Press and hold the full screen button on Android Studio (while not in full screen mode).
  • Move it to the left part of the screen.
  • Now in the right part you will see "candidates" to share the full screen with. Your simulator/emulator should appear here. Click on it. It should expand to fill the right half of the screen.
  • Drag the handle between the left and right part to the right, such that Android Studio occupies more space.

See https://support.apple.com/en-au/HT204948

like image 22
User Avatar answered Sep 27 '22 17:09

User