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
-1
votes
2 answers

Android Camera Intent onActivityResult() Null error using a Developer.Android guide

I'm attempting to use the basic taking photo intent to return a thumbnail and set it to an image view, as shown on the developer website: static final int REQUEST_IMAGE_CAPTURE = 1; private void dispatchTakePictureIntent() { Intent…
Mr.Drew
  • 939
  • 2
  • 9
  • 30
-1
votes
1 answer

camer2basic surface size error

i am working on camera2basic sample of google this project : https://github.com/googlesamples/android-Camera2Basic but when open camera i get two errors : Surface with size (w=720, h=960) and format 0x1 is not valid, size not in valid set:…
-1
votes
1 answer

How to save picture to gallery in Android

I am new to programming and especially Android. I am making a simple application where I am invoking the camera and taking a picture, the picture is then displayed in an ImageView but I also want it to be stored in the gallery when I click the…
Simon27
  • 1
  • 1
  • 2
-1
votes
2 answers

How do I take a picture on Android app, and save photo to gallery in internal storage? (Not SD Card)

I have my app so I have the ability to open the camera and take a picture, the app then shows me a preview of the photo just taken, and when I press 'OK', it is gone. I want to be able to save the image I have taken to my internal storage on my…
Boi
  • 23
  • 7
-1
votes
2 answers

how to use savedInstanceState to save camera information when the orientation change occure

I am developing an Android app with camera intent to capture images. My app is not restricted to any orientation and should work on both and my app crashes when user start in portrait and then take the image in landscape and press OK in the…
Nani
  • 97
  • 13
-1
votes
1 answer

Take images without closing camera in Android

I want to develop camera functionality for my app where I have to capture 10 images. The camera should not close, rather it should continuously take pictures while I hold the shutter button. I am using intent for opening the camera, but after taking…
androidking
  • 207
  • 5
  • 17
-1
votes
3 answers

How do I use an image that i captured using the camera and set that to an ImageView?

I am using the following code to capture the image from the camera and store it in the public directory pictures. How do I use the same image and set it as in ImageView? public void take_photo(){ if…
-1
votes
1 answer

Camera with pattern in android

How can I open the device camera with a pattern of body? To have the user take a picture into the pattern. The pattern shuold be an image.
-1
votes
1 answer

Why when photoURI passed on the onActivity() says null?? what am i doing wrong

This is my MainActivity other functions actually works except for the buttonUpload. The app unfortunately stops when i hit the buttonUpload. Any insights guys? badly needs. And also my logcat is not working on android studio 2.3.1 idk why public…
-1
votes
1 answer

How to select image from gallery or camera in android?

I want to know how to select image from camera or gallery programmatically, where image is picked by user in android?
Khusboo
  • 89
  • 11
-1
votes
1 answer

No activity found to handle Intent com.android.camera.action.CROP

I'm trying to do a picture from my application. I can launch the camera and do the picture, but when has finish to do the picture my app crash. I can see in my screen that my gallery is stopped and this is the error in my log: I've tried to find…
S.P.
  • 2,274
  • 4
  • 26
  • 57
-1
votes
2 answers

How to distinguish between camera and movie mode in Android?

I am using Android 6.0 and open the camera intent by Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); try { getApplication().startActivity(intent); }…
John
  • 2,838
  • 7
  • 36
  • 65
-1
votes
2 answers

Camera error: Cannot connect to the camera

I want to use the built-in camera functionality of a device. having read the documentation, this is the method I am using private void dispatchTakePictureIntent() { Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); if…
user6456773
  • 381
  • 2
  • 10
  • 18
-1
votes
1 answer

How to add camera behind popup

I have an app when I scan a barcode automatically it will open a popup with some informations. But my problem is I don't know how to put camera behind popup, something like this in the photo? Thank you
-1
votes
1 answer

Opening front camera programmatically in android

I'm working on android marshmallow. In my application I'm trying to open android mobile front camera pro grammatically for capturing users profile pic & to display it for preview I've tried lot of examples available that're available in the…