Android 앱 실행중 화면이 꺼지는 것을 방지하기 위해서는 다음의 코드를 사용하면 된다.
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
예시
Google Developers