-1

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

Community
  • 1
  • 1
Neha Bhargava
  • 21
  • 1
  • 1

4 Answers4

2

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)

check this out

Community
  • 1
  • 1
Jay Mayu
  • 17,023
  • 32
  • 114
  • 148
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.

tafty
  • 511
  • 4
  • 7
  • Thanks for reply, i have tried this but it gives black screen or current xml view that i have set onCreate() function ,but i want screenshot from where application launch (application menu or home screen of android device). – Neha Bhargava May 03 '12 at 05:38
0

See this code.It may help to you.

View v1 = view.getRootView();

                            v1.setDrawingCacheEnabled(true);

                            Bitmap bm = v1.getDrawingCache();
Venkata Krishna
  • 1,543
  • 1
  • 11
  • 19
-1

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.

Venkata Krishna
  • 1,543
  • 1
  • 11
  • 19
  • Thanks for reply but i want to implement application to capture device screenshot, that's why i want solution with code – Neha Bhargava May 02 '12 at 09:24