Currently, I have a standard image selection dialog (from an SD card) shown when disabling this intention:
Intent intent = new Intent(); intent.setType("image/*"); intent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(Intent.createChooser(intent, "Select Picture"), PICK_IMAGE);
This list lists all applications / actions that can return an image (for example, Gallery).
In the same standard list, I also want to include an option that will launch the camera and return the image taken with it. The problem is that I canβt understand how to do this in a non-standard way (creating my own dialogue with a user layout, application images + name, etc.).
Camera activity can be started as follows:
Intent camera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); URI pictureUri = Uri.fromFile(new File("dummyPath")); camera.putExtra(MediaStore.EXTRA_OUTPUT, pictureUri);
Is there an intention that will allow me to choose an image from an SD card or one with a camera?
Update: I found a solution, double-checking it and posting it here.
source share