0

I am developing an android application on eclipse. I want to take screenshot of Emulator programmatically, as a jpg file to convert it to pdf when user clicks a button.

How can I take, and how can I access this saved file.

Thanks


I've tried this answer, but I've "ACCUWX cannot be resolved to a variable" problem on this line:

String mPath = Environment.getExternalStorageDirectory().toString() + "/" + ACCUWX.IMAGE_APPEND;
Community
  • 1
  • 1
essbek
  • 59
  • 1
  • 3
  • 10

2 Answers2

3

In Eclipse,

Open Window -> Open Perspective -> DDMS

In DDMS perspective,

Window -> Show View -> Devices

In devices view, you'll see a Camera icon over there. That for snapshot.

Rajkiran
  • 15,845
  • 24
  • 74
  • 114
0

If you to take snapshot programmatically (not using the Devices view), have a look at this answer.

Community
  • 1
  • 1
Rajkiran
  • 15,845
  • 24
  • 74
  • 114
  • Thanks, but I have an issue about this answer.It gives this error; ACCUWX cannot be resolved. And I couldn't find anything to import. – essbek Sep 10 '12 at 10:40
  • Is ACCUWX an id of any of your views? Please post some code so that people can resolve your issue. And you may want to edit your question, as it does not give correct idea of what you're actually trying to do. – Rajkiran Sep 10 '12 at 10:44
  • I've edited my question. I don't know about ACCUWX. It can't resolved.String mPath = Environment.getExternalStorageDirectory().toString() + "/" + ACCUWX.IMAGE_APPEND; – essbek Sep 10 '12 at 11:01
  • C'mon man. Why do you blindly copy someone's code? Please try to get what is written in that code. ACCUWX.IMAGE_APPEND is name of the file in that answer. You replace ACCUWX.IMAGE_APPEND with XYZ.jpg and it'll work. – Rajkiran Sep 10 '12 at 11:30