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

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?

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:
Click File > Settings > Tools > Emulator (or Android Studio > Preferences > Tools > Emulator on macOS), then select Launch in a tool window and click OK.
If the Emulator window didn't automatically appear, open it by clicking View > Tool Windows > Emulator.
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

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

I also looked into this and there doesn't seem to be any support for this. Perhaps you could write a plugin that somehow wraps an external window inside a panel, I don't know if the IntelliJ API supports it though.
The closest thing you got on macOS is the split-screen mode with full-screen apps.

Related

Android Studio for blind developer

I am a blind Java developer. I am following a training in full stack JavaScript and we are learning React Native after React for the web.
I would like to test code with Android Studio emulator, instead of installing on a device.
At the moment I am not able to test my code, and it is very disturbing to learn.
Is there a solution for me to use my screen reader (NVDA on Windows and orca on Linux) with Android Studio emulator window? Because actually my screen readers recognize emulator window as a picture, it is not able to focus widgets.
I would like to use emulator and use the integrated Android screen reader talk back in Android Studio to test my code.
I have followed instructions on this page:
https://developer.android.com/studio/intro/accessibility
I use Expo to launch my project on terminal.
I launch Android studio and start an Android emulator.
I used a NVDA which is 32 bits software.
So I had set up a Java 8 32 bits, because it's the only 32 bit version that I found.
I enabled the Java access bridge with command line in JRE 8 directory, but I have also an Open JDK 11 64 bits installed, it could be a problem.
The main problem that I can not get focus on Android emulator windows.
As far as I know, you can't.
If I remember correctly the Android emulator is not a fully fledged VM, like VirtualBox or Qemu, so you can't use it like a device with the full Android operating system.
In simple words, the Android emulator catches all system API calls and makes your application think it is running into a real Android device. So because TalkBack or accessibility services are separated apps and the emulator can't run your application alongside the accessibility services.
I'm so sorry, but probably the simplest way is to grab an Android phone, a used one from E-Bay for example, to connect directly to Android studio and test your apps.
When choosing a test device take into account the fact that most of the time smartphone vendors apply customizations on the Android version that ships with their devices, so make sure that TalkBack is proved to work reasonably well.
About Java, NVDA and AccessBridge: if you are using the latest version, both NVDA and Android Studio, you don't have to worry about AccessBridge and 32bit stuff. I'm pretty sure that with recent NVDA versions the program runs in 64bit mode and Android Studio ships with his 64bits VM with AccessBridge already there, I'm working with this configuration. In case you may try to activate it with jabswitch --enable command.
On Linux the things are rather difficult, you have to use a distributions with all accessibility software up to date, including Java ATK wrapper, but take into account that Android Studio is not officially supported with Linux accessibility framework at the moment so you have to work with Eclipse or with a simple editor like VS Code.
Please use your Android Phone for such features, because Android studio is not a full fledge Emulator. But using your phone continuously with your Laptop/PC can be a big hassle, so using following method (by getting someone's help) get your phone connected to Android studio Wirelessly.
adb tcpip 5555
adb shell ip addr show wlan0
adb connect ip-address-of-device:5555
IP Address can be found in Settings → About → Status.
This is how you can use all android features for blind people.

Visual Studio 2019 Diagnostic Tools for Xamarin Forms Project Not Supported?

Diagnostic tools were running previously, but I closed the window (and probably disabled in the options also) because I didn't need it at the time.
Now I've re-enabled it and it seems to not be working anymore. I get the following message. Any ideas how to get it back? I'm debugging a Xamarin Forms Android app.
I reproduce the error.
You could set the Attaching to Process, which is what ended up working. Debug > Attach to Process, which opens up a window that lists a large number of available processes. You could search in Available processes to find the device. I use Android emulator for test. My emulator device process is qemu-system-i386.exe. If you do not make sure the process of device, you could check on Task Manager.
After Attach, you could use the diagnostic tools in Xamarin.forms Android project.
Updated:

Can emulator in android studio shares full screen with other application in MAC?

I notice when I try to move emulator to another full-screened application, it was disabled. Is there any way to make it share screen? I am using android studio 2.3.3. It should be a useful property when using a 21:9 screen...

Android Emulator not sync with VS 2015

I am having some issue when running a Xamarin.Forms application in the Android Emulator using Visual Studio 2015. At the beginning everything was working OK. Every time I did a change either in XAML or C#, when I rerun the emulator I can see the changes (without closing it).
Now, for some reason if I do the same, those changes are not applied in the Android Emulator. In order to see any change, I need to close the emulator and click the green play button again every time.
For example, if I want to change the FontColor of a label to be Blue instead of Black in XAML, before just clicking the restart button was enough to see the change. For any C# change, clicking the stop button and then the play button was enough as well.
Now, to see the same result I have to close the emulator and reload it again. Which take some time.
Has anyone have faced the same problem? Any help/ clue would be ver helpful?
Thanks!
#MikePR
I suggest to get rid of the Hyper-V based VS Android Emulator and use the Intel HAXM
native Emulator. I experienced much simular
issues with Hyper-V emulator, too.
Or much better get rid of any emulator and use
vysor.io and visualize your real device like an
emulator on your desktop. My personal favorit.
Hope it is helpful.
PS: Never in life use GenyMotion. That doesn't work in Remote Desktop Sessions and only runs
on windows machines with OpenGL 2.0 installed
and HAXM and Hyper-V disabled. I currently had that disappointing experience.
A really cool tool for XAML Preview is Gorilla Player!

Android Studio window rendering/refreshing by clicking on other window on MAC OS

I don't know what kind of keyboard combination I clicked with my MAC OS on Android Studio 1.5.1, but every time I click away to another window (e.g. safari), the complete android studio window is refreshing. The same if I am going back to click on android studio, the complete windows is refreshing as well. It is really annoying, and I don't know how to get rid off it.

Resources