DART-SD410 Android Capturing camera image

From Variscite Wiki
Revision as of 13:18, 17 April 2016 by Leonid (talk | contribs) (Created page with "= Capturing camera image = Capture the camera image can be done using GUI or via console.<br/> To capture the Camera image from console use the following:<br/> Start Camera ap...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Capturing camera image

Capture the camera image can be done using GUI or via console.
To capture the Camera image from console use the following:
Start Camera application

$ su
# am start -a android.media.action.STILL_IMAGE_CAMERA

Send KEYCODE_CAMERA event (take the picture)

# input keyevent 27 

Send KEYCODE_BACK event (exit Camera application)

# input keyevent 4

All this can be done in one line

# am start -a android.media.action.STILL_IMAGE_CAMERA && sleep 1 && input keyevent 27 && input keyevent 4