안드로이드 개발 질문/답변
(글 수 1,399)
원격으로 기본 카메라 앱을 실행 시키고, 촬영 버튼을 누르는걸 만들고 있어요.
try { Intent buttonDown = new Intent(Intent.ACTION_MEDIA_BUTTON); buttonDown.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_CAMERA)); _context.sendOrderedBroadcast(buttonDown, null); buttonDown = null; } catch (Exception e) { e.printStackTrace(); } try { Intent buttonUp = new Intent(Intent.ACTION_MEDIA_BUTTON); buttonUp.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_CAMERA)); _context.sendOrderedBroadcast(buttonUp, null); buttonUp = null; } catch (Exception e) { e.printStackTrace(); }
이런 식으로 카메라 앱은 구동을 시켰어요.
근데 촬영 버튼을 누르는걸 못 찾겠어요 ㅠㅠ
분명 KeyEvent.KEYCODE_CAMERA에는 Camera key. Used to launch a camera application or take pictures 되어 있어서 앱 실행이랑 촬영이 다 될 것 같은데, 안되더라구요...
어떤 블루투스 기기 보면 촬영도 시켜주던데, 좋은 방법 없나요?