How to take emulator screenshots using Eclipse?
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.
Eclipse and Automatic Screenshots
Is there any feature in eclipse that will automatically take
screenshots of every screen while the app is running?
Yes, 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.
does this need to be done programatically?
Yes, you can also do it like it as Below Code Suggests.
// image naming and path to include sd card appending name you choose for file
String mPath = Environment.getExternalStorageDirectory().toString() + "/" + ACCUWX.IMAGE_APPEND;
// create bitmap screen capture
Bitmap bitmap;
View v1 = mCurrentUrlMask.getRootView();
v1.setDrawingCacheEnabled(true);
bitmap = Bitmap.createBitmap(v1.getDrawingCache());
v1.setDrawingCacheEnabled(false);
OutputStream fout = null;
imageFile = new File(mPath);
try {
fout = new FileOutputStream(imageFile);
bitmap.compress(Bitmap.CompressFormat.JPEG, 90, fout);
fout.flush();
fout.close();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Then, when you need to access use something like this:
Uri uri = Uri.fromFile(new File(mPath));
How to take a good quality screenshot on emulator?
According to this answer that is an emulator issue. To solve this, you need to enable the 'use host GPU' setting when creating an emulator, according to another answer.
Capture screenshot in GenyMotion
Disclaimer : I'm part of the same company as the Genymotion team.
This feature is included in the product. It is one of the paid feature of the screencast widget. Look at the pricing page here.
Two ways to access it:
- pay for the pro or indie licence
- use the trial version, it offers you the indie features. Be careful, there is only one trial day left :-/
Once your VM is started, open the screencast widget
Then take a picture with the dedicated button
UPDATE: You have bellow another ways to take a screenshot using Android Device Monitor or the command line
Why can't I take screenshots in Android Emulator after installing Genymotion?
It's a known bug on 4.3 images, they are working on a fix. On a 4.2.2 image it's working for me, you can try to create a 4.2.2 device to take screenshot in the meantime.
Source: On twitter @genymotion responded to @Littledot1230 on this question :)
Related Topics
Android - Correct Use of Invalidateoptionsmenu()
Display the App Icon If the Contact Is Associated with the Application in Phone Address Book
Onbackpressed to Hide Not Destroy Activity
Stackoverflow: Caused by Nested Views
Onitemclicklistener and Onclicklistener Not Working for Listview
How to Apply Custom CSS to Android Webview When Url Is from Internet Server
Input Field Hidden When Soft Keyboard Appears in Phonegap
How to Load Image into Imageview from Url Using Glide V4.0.0Rc1
How to Add Firebase Database Rules Without Authentication
Receive Audio via Bluetooth in Android
Onpagefinished() Never Called (Webview)!
Partial Invalidation in Custom Android View with Hardware Acceleration
How to Make My Layout Able to Scroll Down
How to Detect If Device Support Notch Display
Boot Broadcastreceiver Does Not Work on Xiaomi Devices
How to Override a Module/Dependency in a Unit Test with Dagger 2.0