tags:

views:

275

answers:

3
+4  Q: 

Screenshot Android

How can I take screenshot of selected area of phone-screen not by any program, but from code.

+1  A: 

FWIK, there's no provided API do do that at the moment.

RC
But there is many programms wich able to take screenshot.
shtpavel
I think they use some "hack" to dump the frame buffer directly and as stated by GDR, you need root to do that
RC
Thank you a lot
shtpavel
+4  A: 

All the programs which allow screenshots work only on rooted phones.

GDR
Damn.. Thank you
shtpavel
+1  A: 

You can try the following library: http://code.google.com/p/android-screenshot-library/ Android Screenshot Library (ASL) enables to programmatically capture screenshots from Android devices without requirement of having root access privileges. Instead, ASL utilizes a native service running in the background, started via the Android Debug Bridge (ADB) once per device boot.

Kuba
I tried this.but it takes screenshot of the running app alone. Its cant help if i want to take screenshot of the homescreen. do you how to take screenshot of the homescreen withthat code?
Janardhanan.S