2022년 6월 15일 수요일

안드로이드 화면 캡쳐하기

프로그래밍으로 화면 캡쳐하기.
아래 명령어는 system app으로 등록되어야 가능합니다.
Process process;
try {
process = Runtime.getRuntime().exec("screencap -p /sdcard/screen.png");
process.waitFor();
} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
view raw screencap.java hosted with ❤ by GitHub