Screenscraping an App running inside an Emulator - android

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.

Related

Android Program is running slow

I developed a firebase app, where one could post and you could like and react. Then, I stopped working on it. After some time, I started working on it again, when I was working on it, I found that the app now runs very slow, I had 3 layout (fragment used) and view pager added to it via adapter(before). Beforehand it used to work like a charm, but now when I move from one activity to other, the mobile device kind of like hangs. It was not behaving like this previously, why is that? Anyone facing similar problem?
First of all I would propose you allocate a larger memory to your ADB virtual device.
If this doesn't help, use Android Profiler to better understand the cause of this memory loss.
https://developer.android.com/studio/profile/android-profiler.html
Just go to your AVD device settings and disable Device frame, this will improve the speed of your emulator

Android emulator not showing up on desktop screen

I encounter really strange behavior with android emulator. First of all, I am using extended monitor for development. So i code on my laptop and check the app on emulator on second screen. For some reason, I can't see emulator again after disconnect vga cable but I can see emulator is running on taskbar. Somehow, I can't bring emulator out on desktop screen or move to another screen, it just hidden and I don't know how to bring it out. It already happens to me two or three times. Can somebody help me out? What can I do to solve it?
Below is screenshots of my desktop with emulator running.
alt+tab
avd manager
It happens again when I change to another monitor for extended screen. I try what #Zoe suggested press ALT+SPACE to move but it doesn't work because move is grey out.
So my solution, I created two emulators, for two different monitors.
I am not sure why I got downvoted though.

Taking a screenshot of Android Emulator in background with OpenGl app

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?

Why am I getting an empty screen in Eclipse when emulating a simple Hello World program for Android?

I'm following this tutorial: http://developer.android.com/training/basics/firstapp/running-app.html#Emulator
In it there is a simple code for a layout with a Text parser and a button. When I input the code in my Eclipse and "Run" the program I arrive at an empty Android phone simulation. The phone diplays "Android" across the screen and my program does not run. Please instruct me on where I am making a mistake. My code is equal to the code in the tutorial, by the way.
It's booting. You just have to wait for the emulator to start. It's just like real Android devices: it takes a while to boot. When it shows the desktop, it will launch your application.
On slow machines it might take a while (and I mean a good while). May I suggest a faster/stronger machine, or even better, a real Android device, for testing.
For better performance, do not close emulator window, this way it won't have to boot each time.

Android Emulator does not work with Mono for Android

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.

Categories

Resources