title: toggling between front and back camera without going back to home screen using ADB
body: <p>Hi so I am writing a script that calculates some latencies of the camera app, and i am using the adb shell. One of them is the time that is for the camera to switch from the front camera to the back or the back to the front while the user is using the app.</p>
  
  <p>so i tried:</p>
  
  <pre><code>adb shell am start -a android.media.action.STILL_IMAGE_CAMERA --ei android.intent.extras.CAMERA_FACING 1
  </code></pre>
  
  <p>and then I tried calling the same intent but changed the "1" to a "0" but i got this error, </p>
  
  <pre><code>Starting: Intent { act=android.media.action.STILL_IMAGE_CAMERA (has extras) }
  Warning: Activity not started, its current task has been brought to the front
  </code></pre>
  
  <p>which makes some amount of sense, but now i am stuck as i dont know how to go about and actually switch between cameras while i am still in app. Any help would be appreciated. THANKS!!!</p>