对于屏幕截图,我使用这个命令,在虚拟仿真器上它工作良好,使屏幕截图正常,但是在我的手机上(吉奥星系)不工作,我不会理解问题所在--请帮我谢谢。
Process sh;
sh = Runtime.getRuntime().exec("adb shell screencap -p /sdcard/screen.png");发布于 2013-08-22 10:53:31
尝尝这个
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();如果不是那样的话
您可以尝试以下库:http://code.google.com/p/android-screenshot-library/安卓屏幕截图库(ASL)允许以编程方式从安卓设备中捕获屏幕截图,而不需要具有根访问权限。
https://stackoverflow.com/questions/18378056
复制相似问题