How to take screenshot in android emulator - android

From Android 4.0, it supports volumn down+power key to take screenshot and saved in gallery. But how to do this in android emulator.
I know in eclipse, there is a 'take screenshot' button, but this is not what I want. I need it in the emulator and saved in emulator.

As seen in this post: Screenshot of the Nexus One from adb?, you can also take a screenshot using adb:
adb shell /system/bin/screencap -p /sdcard/screenshot.png
adb pull /sdcard/screenshot.png screenshot.png

just click in photo icon for take screenshot in android emulator

In new emulator you can do it by pushing camera icon. By default it saved in desktop.

Window > Show View > Other. In the newly opened dialog box, under Android category, select Devices.
Now on the Devices panel, Click the button as shown in the Image and your screenshot is ready.

You can use ddms which has option to take screen shot.
On DDMS -> Select Device -> Select Screen Capture
Edit
AFIK its not possible but this scenario will solely depend emulator image. Device hotkey might work on some OS images. Try same key combination from emulator link.
If your emulator uses factory or same images then it should be possible. You can download factory images for your emulator. see available nexus images from this link also it is possible to download images from manufacturer site.
Alternatively you can take screen shot following way,
View content = findViewById(R.id.myView);
content.setDrawingCacheEnabled(true);
Bitmap bitmap = content.getDrawingCache();
And later save this anywhere you like. This is not optimal solution and it will only print what you have inside your view.

Long Press on Power button from the left side menu. then you will have the option for the screenshot.

You can take a screenshot if you open the Android view "devices" (under Window --> Show View --> Other... --> Android --> Devices). Click on the device or emulator you want to take a screen shot of, then click the "Screen Capture" button (it looks like a little picture, and it should be next to a stop sign button). Occasionally the device won't immediately load the picture; sometimes you have to close/reopen the screen capture window.
This is equivalent to taking a picture via DDMS, but you can do it in Eclipse instead of opening another application.

#!/bin/bash -f
while : ; do
echo "press the number of the screenshot to capture";
read i
adb shell /system/bin/screencap -p /sdcard/screenshot.png
adb pull /sdcard/screenshot.png "${i}.png"
done
ctrl-c

You can simply press the shortcut key i.e. ctlr + S to take screenshot in the emulator.
Also there is a button given on the emulator to take the screenshot.
Simply press
this button button and you'll have a screenshot of the emulator.
Hope that it helped you.

Go to your emulator then press:
ctrl + s
to save your screenshot.
hope its work.

Related

Simulate taking a screenshot in Android emulator

I'd like to know how I can simulate a device taking a screenshot in an android emulator. I know how to take a screenshot of a device but I want to simulate someone taking a screenshot with their actual device.
Any assistance would be appreciated.
You can do it in two ways -
From Eclipse: Windows --> Show view --> other --> Devices.
Once the Devices window is open, you will see a camera icon on the top right side. Click it...
From command line -
Type adb shell and once you're "inside" type screencap name.png (you'll have to do it in a folder with write permission).
After that you can exit the shell and type - adb pull /picture_path/name.png

DDMS Screenshot tool copy does not work on Linux

Using DDMS via Eclipse or through Monitor, it will take the screenshot, but when you copy to clipboard. You can't do anything with it. Gimp, Inkscape, LibreOffice don't recognise what is in the clipboard.
The save option is not that good because the quality it uses to save the png is awful. This makes it difficult to create good quality screenshots for your app. Because of the high resolution of devices the window of the captured screen goes outside the bounds of the desktop/workspace so you can't use a take a screenshot of that window.
Is there another trick to getting around this, like being able to change quality setting ddms saves images? or using adb shell to take screenshots. Is there a screen capture tool in Linux that can take screenshots across workspaces.
ATM I am taking two screenshot one for each workscape the window is on and then using GIMP to line up the images, this takes time, and it is frustrating.
Yes you can take screen shot using adb shell as
adb shell /system/bin/screencap -p /sdcard/img.png
It will be in your sdcard of emulator you can push it out to system ...
I think the above code works from ICS .

Screenshot For Device

I've connecting my device to PC. I would like to take screen shots from my device. How can i done this? I'm using Eclipse IDE. Is there any way to do this?
1.connect your device to your pc.
2.Open the DDMS
3.select the device from devices options
click on srceencapture icon.
see the bellow image.
Start the DDMS perspective from the Window menu. On the left side of the window you can see The emulators and devices listed. Select the desired device and click the screen shot option present in same window.
In the image the Devices window has the snapshot option enabled.

Android screen capture problem in Eclipse

I am having trouble using the "Screen Capture" function in Eclipse to capture an Android screen shot. I have the correct tab open, and when I click the screen capture icon, the box pops up and just stays on "Capturing..." but the display never changes from a white box with an X through it.
I have USB debugging turned on on the phone and I have the correct device selected in Eclipse..any other tips? Thanks!
Navigate to your android sdk install folder. Open the Tools folder and find DDMS. Run DDMS and use the Screen Capture option from the Device pull down menu. This is the native tool that Eclipse tries to use and it works better natively.
On the screen capture window, click done, then reopen the screen capture dialog. I have to go through this process every time I want screen caps, for some reason it doesn't connect to device on the first run.
This works for me, also when Logcat ceases to work: When I disable and re-enable the debug mode on the device, everything is working again.

How to take emulator screenshots using Eclipse?

I need to take screenshots of an android application running on an emulator in Eclipse Galileo.
Is there a built-in feature for this or do I have to download a plugin of some sorts?
You can take a screenshot if you open the Android view "devices" (under Window --> Show View --> Other... --> Android --> Devices). Click on the device or emulator you want to take a screen shot of, then click the "Screen Capture" button (it looks like a little picture, and it should be next to a stop sign button). Occasionally the device won't immediately load the picture; sometimes you have to close/reopen the screen capture window.
This is equivalent to taking a picture via DDMS, but you can do it in Eclipse instead of opening another application.
Screenshots on Android Devices using Eclipse, a Visual Guide
In the DDMS perspective in Eclipse there is a "Screen Capture" button. (Make sure you have your Android SDK and Eclipse plugin up to date, not sure this was always an option). Just press that button and a screenshot of whatever device you have DDMS connected to (either a real Android device or the emulator) will be created and opened in a new window where you can save it as a png.
You load the emulator with your app normally, through Eclipse, but you take the actual screenshot from DDMS, a tool that's included in your SDK, under the "tools" folder.
In DDMS, press Ctrl+S to take a screenshot.
1-open the DDMS prescriptive,the right click on mouse.
2-there click on export screenshot.
3-then it will show you option to save your file as .png file,with whatever name you like you may save it.
I just do a control print screen, which copies the image into the clipboard, then open MS Paint then do a control Z. Then you can crop and size it to your liking. Is this ok?

Categories

Resources