1

Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);

startActivityForResult(intent, CAMERA_CAPTURE_IMAGE_REQUEST_CODE);

I have tried that one but it will close the camera once I captured once. What I want to let the camera stay on as long as the user won't press back. Help.

1 Answers1

0

For capturing multiple pictures by camera below code will help you :

Intent intent = new Intent(
        MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
    this.startActivity(intent);
KishuDroid
  • 5,411
  • 4
  • 30
  • 47
  • But it won't call onActivityResult – user3777553 Sep 14 '15 at 10:12
  • Above you can also use startActivityForResult(intent, CAMERA_CAPTURE_IMAGE_REQUEST_CODE) instead of this.startActivity(intent). – KishuDroid Sep 14 '15 at 10:19
  • I also tried that but it won't really call onActivityResult – user3777553 Sep 14 '15 at 10:21
  • This is what happended when I used that code. I pressed the button to open up the camera and it calls the onActivityResult and goes to my if clause to check if the user cancels it (I haven't even captured anything but it calls the onActivityResult). And when I pressed the capture button of the camera, the onActivityResult is not called. – user3777553 Sep 14 '15 at 10:32
  • Please follow this link: May be it helps you: http://stackoverflow.com/questions/8647371/how-to-take-multiple-photos-before-dismissing-camera-intent – KishuDroid Sep 14 '15 at 11:05
  • I'm also looking at that but I don't know how to use the ContentObserver – user3777553 Sep 14 '15 at 11:41
  • This is a link which referencing content observer use for audio : http://stackoverflow.com/questions/15899110/observing-changes-in-android-content-observer-for-audio-media-external-content-u You can try something like this. – KishuDroid Sep 15 '15 at 04:35