Issue
I am trying to figure out what is the command to load the camera app in different modes like following:
- Toggle between camera and video cam corder mode
- Toggle between front and back camera
I have used the following command to launch the camera applicaiton
adb shell am start -a android.intent.action.MAIN -n com.android.gallery3d/com.android.camera.CameraLauncher
which does launch the camera app successfully but I do no know how to toggle modes. Is there any wiki on all the different commands of ADB? the ADB documentation does not seem to talk about this.
Any ideas?
Solution
You can pass an Extra with an integer value using the --ei flag to the am start
command
Front Camera
adb shell am start -a android.media.action.IMAGE_CAPTURE --ei android.intent.extras.CAMERA_FACING 1
Back Camera
adb shell am start -a android.media.action.IMAGE_CAPTURE --ei android.intent.extras.CAMERA_FACING 0
Answered By - Chris Stratton
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.