I'm looking for a way to take a screen shot/screen capture of an openGL application that is behind another window. Namely, I want to screen capture the Android Emulator running an openGl app.
Since the Android Emulator is behind another window, it's not visible on the PC screen, so that taking a normal screenshot or using one of the several screenshot tools I found does not work. Making the Android Emulator the active window to capture it is not an option, because I don't want to distract the computer user.
Of the numerous screenshot tools I tried, one was able to capture background windows. But it couldn't handle opelGl and returned only a black picture. I didn't find a tool that could handle both background windows and openGl.
Note: Although the user should not be disctracted, using a graphical screenshot tool will probably work. I'd do this by leaving the tool in the background and sending it mouse/keyboard input, e.g. via AutoHotkey.
I'd also be comfortable with writing a program for this task, but I haven't found a way to screen capture an openGl window. It's possible to capture Direct3D Windows, and it is also possible to draw the content of an openGl window somewhere else, but neither of this seems to be helpful here.
Using the android debug bridge to take a screenshot returns only black pictures. People often suggest turning the gpu acceleration of the emulator off, but when I do this, the android app I'm trying to capture doesn't start anymore.
I'm using Windows 7 (32bit) with the latest Android SDK and Android 4.4.2. When the Android Emulator is visible, a normal screenshot shows it's actual content, not only a black rectangle.
So is there any way to do what I want?
Related
I've been doing development with Flutter. I was using a real hardware but wanted to use an emulator. I set it up but there's this issue.
I usually put my apps in virtual desktops and I switch between them with Ctrl+Meta+[arrow keys]. Each of them have a special purpose, usually desktop 1 is for browsing, desktop 2 is for development and desktop 4 is extra (for testing UI apps and emulator in this case).
However, after I launch Android emulator and switch to a different desktop, it results in the issue seen below:
The red area you see stays unresponsive for other apps such as browser, VSCode etc. (i.e. does not respond to clicks). That area is where the emulator is on Desktop 4. And it also keeps showing multitouch tool.
It's a bit annoying so I wanted to ask if anyone got this issue and if they have any solutions.
Thanks in advance.
Environment
Kubuntu 20.04
AMD Radeon R7 240/340
Solution 1
I have, somehow in a weird way, found a workaround for this issue.
After having this issue, go to the emulator window and press the magnifying glass with a plus button icon twice.
After that, it will drop that weird multitouch state and it won't bother you even as you switch desktop.
Rebooting computer will result in the same bug, however, you have to do it again.
Solution 2
Another method that works is to simply resize the window. If you have a device frame on your emulator, you can simply hold down the Meta key and hold right click and resize your window.
Solution 3
You can also maximize the window. If you have device frame around emulator window, you can press ALT+F3, which opens up window options menu, then click "Maximize". This will get rid of it.
I'm trying to run a sample Xamarin app and I think my Android emulator is acting up. I've tried enabling Hyper-V, increasing the RAM, telling it to use the host GPU, launching the virtual device from the command line instead of the GUI, and double checking that I have the correct version of the build tools for the version of Android I'm attempting to run.
As a test I've just run the emulator by itself without an app and have discovered that it still shows a white screen even when it is apparently running, somehow. The first image is what I get when I press the Screenshot button. The second image is what I actually see on my desktop. It's been like this for over 10 minutes.
Any advice? I've been Googling like crazy and can't seem to work this out.
Have you tried simply changing the renderer?
Go on the sidebar menu, click the 3 dots>Settings>Advanced and try changing the OpenGL ES Renderer
I'm running software that will attach to a window and periodically screenscrape what's inside it. This works well for all normal processes, however I am trying to screenscrape an App that is running inside an emulator on my PC.
When it scrapes the screen it just scrapes a black space of the Emulator and not the App running inside it.
Is there possibly a way around this? some program that can communicate it, or software that mirrors what is running in the Emulator which can then be scraped?
Any help would be greatly appreciated.
You can use the emulator screen capture button to capture only the emulator's buffer, and use it to embed its picture in the overall host screen capture.
I am trying to write an application with Mono for Android. In an attempt to do this, I'm using the default template in monodevelop. I can successfully compile and run the application. When I run the application, it looks similar to the one shown here: http://docs.xamarin.com/android/getting_started/hello_world
There are two oddities in my version though:
The button is red
I can't seem to actually click the button. When I use my computers mouse, it acts like it won't click the button. This is not limited to the application either. If I try to click the home or search button in the emulator itself, I noticed that nothing happens either. Its like the emulator is not responding to my mouse.
As someone new to working with Android, can someone please tell me what I'm doing wrong? I'm using MAC OS X with Lion installed. I'm assuming that I have the SDK and Java SDK installed properly considering the app compiles and when I press "play" I can load the app in the emulator. I just can't figure out why I can't actually click the button. So bizarre.
Any ideas?
The title of this question is pretty misleading, since you're saying that the emulator is not very responsive even outside the Mono for Android application. The problem here is with the emulator itself. The one thing I would recommend trying with respect to Mono for Android is to try starting the application without debugging, as debugging will add extra overhead to running the app.
The Android emulator is notoriously slow, since it is fully emulating the ARM instruction set in software. That said, there are certain things you can do in order to squeeze some more speed out of it. One thing that I've seen make a big difference is to decrease the screen size of the emulator image. Setting this to a small screen size (such as QVGA) can make a big difference. You can manage these settings through Android's AVD Manager.
I'm quite new to Android programming but familiar with C/C++ and Linux enough to program a few stuff. In my next project, I've to run some native application (Linux applications) under Android.
The executable I'm calling is using the framebuffer device to produce screen output. When I try to just call the program the output of the program is lost because Android is redrawing the screen, thus overwriting the framebuffer.
In order to prevent this, I made a "stubbing" Android program, which actually has no window design (just a black screen) but calls my program. This is working good to some extend; however, whenever I rotate the screen, or some Tattoo notification comes, Android redraws the screen and we're back to frame #1...
Thus, I wondered if there is a "low level" API or something, which can prevent Android from using the screen at all, as long as I release it. Shortly, like a WakeLock preventing phone from sleeping, I want a 'Lock' which will lock the screen (framebuffer device) completely. Does anyone know how can I achieve such functionality?
PS: This might have something to do with SurfaceFlinger, but I've read somewhere that it doesn't publish any API to user-level.
On Android the screen belongs to SurfaceFlinger.
The executable I'm calling is using the framebuffer device to produce screen output.
That's not supported.
Thus, I wondered if there is a "low level" API or something, which can prevent Android from using the screen at all, as long as I release it.
Nothing that is supported at the SDK or NDK levels. You are welcome to create your own custom firmware that does whatever you want, and load that custom firmware on your own device.
Otherwise, please use a supported means for interacting with the screen (e.g., OpenGL natively in C/C++).