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
Process sh = Runtime.getRuntime().exec("su", null,null);
OutputStream os = sh.getOutputStream();
os.write(("/system/bin/screencap -p " + "/sdcard/img.png").getBytes("ASCII"));
os.flush();
os.close();
sh.waitFor();