Questions tagged [android-camera-intent]

Questions related about calling the camera app from the local device, without the camera permission.

The camera intent is a way to make photos or videos with the camera app of the device without implementing a custom camera activity.

Here is a basic example for such a call:

// create Intent to take a picture and return control to the calling application
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE); // create a file to save the image
intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri); // set the image file name

// start the image capture Intent
startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);

See the full code on the documentation.

971 questions
3
votes
0 answers

Android, debugging MediaStore.ACTION_IMAGE_CAPTURE Intent

I am trying to take a picture with MediaStore.ACTION_IMAGE_CAPTURE intent in the following way: String fileName = "testphoto.jpg"; ContentValues values = new ContentValues(); values.put(MediaStore.Images.Media.TITLE,…
unorsk
  • 9,371
  • 10
  • 36
  • 42
3
votes
2 answers

My camera application giving null value in Samsung Galaxy S

I have developed a camera application with default camera. This application works in all other Android phones but some problem with Samsung Galaxy S Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);…
3
votes
2 answers

Camera intent staying open on android

For my app I am making, I have the camera intent run when an activity is created. The problem is that when I click ok for the pic I captured, it just reopens the camera again to take a picture. Here is the code: taken is set to false from another…
Cody
  • 29
  • 2
3
votes
3 answers

how to get image name using camera intent in android?

I want to show camera's current take image using like given this code.I can get image from camera and display in imageview.I want to know that image's file name. Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE…
John
  • 217
  • 2
  • 7
  • 13
3
votes
0 answers

In Android 11 R, Camera REQUEST_CODE returns zero

I am trying to take image and save it in a folder using camera intent. The code is working very fine in other Android versions (upto Android 10). But the same code is not running on Android 11. I am also recording video using Custom video camera,…
BhushanDC
  • 73
  • 6
3
votes
1 answer

Camera intent permissions in Android 10

I am having an unusual issue when dealing with using the camera app with an implicit intent in Android 10. I am using the Big Nerd Ranch Android Programming textbook (4th Edition) chapter 16 to learn how to take pictures and store them in an app. …
3
votes
5 answers

Why we need to use attribute?

My question is related to camera. When an application needs to use the system camera, we create an intent with ACTION_IMAGE_CAPTURE action and add a permission like this in the manifest file.
3
votes
1 answer

Android 8.1 Closes Activity when startActivityForResult() is called

somebody come to my rescue. I am building an android application that require taking a picture from the device camera and loading the thumbnail into an ImageView, note that I don't want to save this image, I only want to load it into an ImageView…
3
votes
1 answer

ACTION_IMAGE_CAPTURE returns poor image quality bitmap, where can I get the hi-res image?

I want the good quality image to show in ImageView and upload to the server. I have searched the Internet, StackOverflow and GitHub, but I could not find the answer, maybe somebody knows how can fix it? protected void onActivityResult(int…
3
votes
3 answers

How to specify a directory for new photos in INTENT_ACTION_STILL_IMAGE_CAMERA

I need to take multiple photos at once using the camera intent. The user will press a button from the application and then the camera application will be used. The user will take multiple photos. When the user returns to the main application, I need…
3
votes
2 answers

How to allow multiple images to be uploaded into webview android both from gallery and camera

Hello so i've searched a lot for this and haven't figured it out. I am able to upload a single image using this code and push the image into the server. But the problem is its not allowing multiple image selection from gallery or when I click a…
3
votes
6 answers

How to Open Front and Back camera through intent in android?

We implement camera with intent it's working fine in micromax480p version 5.1 but when we used in Nexus7 version 6.1 by that time camera is opened but i want to open some times Front and somr times Back is it possible to open according to as we…
RAJAN
  • 126
  • 1
  • 1
  • 12
3
votes
3 answers

How to remove mirror effect after capturing image from front camera? [Android]

Basically i create a simple android camera app not adding video recording , i followed this link android camera app tutorial link the problem is when i capture image from front camera , after click capture button the image showing mirrored just…
3
votes
0 answers

Camera Intent saves photos to both sd card and gallery

I am having issues with the camera intent. I am testing my app on real devices - on a Sony Xperia M4 Aqua and ST23 Miro. I managed to get the app working ok on the M4 Aqua, but now I have an issue on the ST23. Every time I capture an Image it is…
3
votes
1 answer

Android:Camera Crop intent Lollipop and above giving toast message as Editing isn't supported for this image

For Cropping images taken from android phone in Lollipop and above One should use File Provider here is my code.
Sutirth
  • 1,217
  • 4
  • 15
  • 26