I’m currently having a standard image selection (from the SD card) dialog shown when firing off this intent:
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent, "Select Picture"), PICK_IMAGE);
This lists all the applications/activities that can return an image (such as Gallery).
In this same standard list, I also want to include an option that will start the Camera and return an image taken with it. The problem is I can’t figure out how to do this in a non-custom way (building my own dialog with a custom layout, application image + title etc).
The Camera activity can be launched like this:
Intent camera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
URI pictureUri = Uri.fromFile(new File("dummyPath"));
camera.putExtra(MediaStore.EXTRA_OUTPUT, pictureUri);
Is there an intent that will allow me to select an image from the SD card or one taken with the Camera?
Update: I have found a solution, will double check and post it here afterwards.
you can have alert dialog to show options.
Source code is given below: