IMAGE A
IMAGE B
The First image is the screenshot of default camera view and the second image is the screenshot of camera view open by intent on my app.
The problem is the default camera have gallery icon.How i can show the gallery icon when i open the camera from my app ?
I used this code for open camera
Intent takeImageIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
What is the code to open phone gallery? To open gallery: (This should be in your activity class.) public OnClickListener btnChoosePhotoPressed = new OnClickListener() { @Override public void onClick(View v) { Intent i = new Intent(Intent. ACTION_PICK, android.
Run the application on an Android phone. Selecting "Take photo" will open your camera. Finally, the image clicked will be displayed in the ImageView. Selecting "Choose from Gallery" will open your gallery (note that the image captured earlier has been added to the phone gallery).
Tap the app drawer icon. It's the icon made of 6 to 9 small dots or squares at the bottom of the home screen. This opens the list of apps on your Android. If you see the Camera app on the home screen, you don't have to open the app drawer. Just tap Camera or the icon that looks like a camera.
The on the stock camera intent cant really be changed, but if you create a custom camera intent, you can add the buttons that you need and link it to another activity that will open a gallery.
There is a very detailed explanation on how to set it up in the android documentation
https://developer.android.com/training/camera/cameradirect
use this piece of code.
Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(cameraIntent, CAMERA_PIC_REQUEST);
working fine for me and Gallery icon is also showing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With