Possible Duplicate:
Screenshot Android
i want to get screenshot of android device from where application launch , please reply if you have solution.
Thanks in advance
Possible Duplicate:
Screenshot Android
i want to get screenshot of android device from where application launch , please reply if you have solution.
Thanks in advance
YOu can take screenshots of running app using code or jar libraries. But to have a system wide screenshot you need to root your phone (before Android 4.0)
You can programmatically get a Bitmap of the entire screen by using the following commands with the top level View of your layout:
topLevelView.setDrawingCacheEnabled(true);
Bitmap fullScreenBitmap = Bitmap.createBitmap(topLevelView.getDrawingCache());
topLevelView.setDrawingCacheEnabled(false);
You can then do whatever you need to with the fullScreenBitmap.
See this code.It may help to you.
View v1 = view.getRootView();
v1.setDrawingCacheEnabled(true);
Bitmap bm = v1.getDrawingCache();
Go to DDMS -> Devices -> check at the top right side there you will find camera icon,click that icon you will get your device/emulator screenshot.