title: Android: How to capture multiple photos with the same camera intent
body: <p>I made an Android app that takes photos one by one, stores them, gives a preview to the user, etc...all of these tasks are accomplished with an intent of type <code>ACTION_IMAGE_CAPTURE</code>.<br>
  So, each time that the user wants to make a photo, he should click on the "take photo button" that starts an intent, and after having waited some seconds to start the camera, the user is able to take a picture; after that the photo is taken and accepted by the user, the camera closes and the picture taken is given back (as a bitmap for the preview) to the calling class via an <code>onActivityResult</code> method.<br>
  Now, if you want to do more than one photo, this procedure can be really tedious.</p>
  
  <p>So, I would like to provide my app with a modality that allows the user to take more than one photo without all the slow stuff mentioned above.<br>
  Just to clarify, I don't want to make a burst mode (photos taken automatically after predefined intervals of time) but I want to make the user able to click the shutter to take photos as much time as he wants without being interrupted by other things.</p>
  
  <p>Searching on the net, I found some information and it seems to me that there are three possible ways to pursue:<br>
  - <strong>making an intent to "INTENT_ACTION_STILL_IMAGE_CAMERA"</strong>: this one is easy to implement, but the camera interface will depend heavily on the app that is called when the intent is made (for example on my One Plus Three, the app called to accomplish this task is "Camera FV-5 Lite", on the emulated device is another one)...as a consequence, I think that is not possible to control the interface or the behavior of the called app (for example, on the app called via intent is possible to switch to video mode, but this shouldn't be possible to do in the app that I'm designing);<br>
  - <strong>using the package "Camera2"</strong> (<a href="https://developer.android.com/reference/android/hardware/camera2/package-summary.html" rel="nofollow noreferrer">https://developer.android.com/reference/android/hardware/camera2/package-summary.html</a>): Google provides some examples of this package here <a href="https://github.com/search?utf8=%E2%9C%93&amp;q=android-Camera2&amp;type=" rel="nofollow noreferrer">https://github.com/search?utf8=%E2%9C%93&amp;q=android-Camera2&amp;type=</a> but I don't fully understand how can be difficult to take this route;<br>
  - <strong>make a picture taking code by yourself</strong>: I think that this is the most difficult way.</p>
  
  <p>It is possible for a beginner-intermediate developer to accomplish this task following one of the way mentioned above (or a different one)?</p>
  
  <p><strong>Similar questions:</strong><br>
  - <a href="https://stackoverflow.com/questions/9509706/taking-multiple-photos-from-android-device">Taking Multiple Photos from Android device</a> : here is asked how to speed up the process and reduce the lag between one photo and another one;<br>
  - <a href="https://stackoverflow.com/questions/29938640/taking-multiple-photos-and-making-gallery">Making a gallery with automatically generated ImageView s</a>: this question is about updating the gallery dynamically with photos made via different intents to ACTION_IMAGE_CAPTURE;<br>
  - <a href="https://stackoverflow.com/questions/8647371/how-to-take-multiple-photos-before-dismissing-camera-intent">How to take multiple photos before dismissing camera intent?</a>: this one talks about the solution with the intent to <code>INTENT_ACTION_STILL_IMAGE_CAMERA</code> coupled with a <code>ContentObserver</code>, that I don't want to pursue as mentioned above;<br>
  - <a href="https://stackoverflow.com/questions/5336890/capturing-multiple-photos">Issues when capturing Multiple Photos: app stops responding, camera preview turns to green and no picture is saved</a>: old post that talks about issues when capturing more than one photo, but one answer is interesting because Camera2 is mentioned.</p>