I want to take a fullscreen screenshot programmatically , for example, one of the android home screen or a menu. How can I get a view of the home screen in my application? I want to take it programmatically!!! It doesn't matter if it requires root mode!
Help me please and sorry for my English!
Follow the link https://code.google.com/p/android-screenshot-library/downloads/list it allows you entire screenshot of any screen not only your app
adb shell /system/bin/screencap -p /sdcard/img.png this is a shell command take screenshot simple and fast
Try this
Use following code
Here MyView is the View through which we need include in screen.
In the adb shell you can use command as
I found this code on this guide on How to take a screenshot on Android.You can refer it for more details.Hope this helps.