I know that this question was asked already but I haven't found a solid solution for this I worked on many examples but none of them was working that properly. I found one example from this post.
I used the commonsware source code. It was working fine, but when I am using the code my camera is getting opened in the horizontal layout instead of vertical layout.
I got to know that there are two ways of doing so. One through the Camera API and another through intent thing. For capturing single snapshot I used the intent part and it was working quite fine.
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
intent.setType("image/*");
startActivityForResult(Intent.createChooser(intent,"Select Picture"), RESULT_LOAD_IMAGE);
But this keeps on clicking the images, My requirement is I need it to stop clicking the images after 5 photos.
I am not getting any clue on how to achieve this.