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
1 answer

RequestCode changes along the way

I have a fragment within a fragment both fragments load fine, except in one of the fragments i have a start camera intent with activity for result if (photoFile != null) { takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, …
Lena Bru
  • 13,521
  • 11
  • 61
  • 126
3
votes
1 answer

Android - resultCode is never RESULT_OK when taking a photo

I got stuck on an app when I tried to take a photo and store it in external storage. The camera intent worked but I couldn't confirm the captured image. Then I changed the onActivityResult to the following to monitor the resultCode. Touching the…
Thahzan
  • 975
  • 2
  • 9
  • 23
3
votes
0 answers

Can't save captured image with Android 4.2.2

In my app I need to capture image with the standard camera app. So, what I did is: public void TakePhotoProofs() { // fetching the root directory root = Environment.getExternalStorageDirectory().toString() +…
Sergey V.
  • 981
  • 2
  • 12
  • 24
3
votes
1 answer

Launch camera activity over lock screen

I have an activity that acts similar to the Facebook Cover Feed (Shows over the lock screen). As you can see Facebook Cover Feed provides a feature to launch the camera by swiping to the left. However, the camera could be launched over the lock…
user2137179
3
votes
2 answers

startActivityForResult from within a DialogInterface.OnClickListener

I'm trying to implement a dialog with a choice. Each choice will start an activity using startActivityForResult and the DialogFragment will handle the response using onActivityResult. So far what I have is something like this: class ChoiceFragment…
3
votes
3 answers

Camera image returns thumbnail in Android

In my Android application, I want to capture an image from the camera and pass that image Uri to next activity. Here, I am getting a thumbnail image of captured image. To solve that issue, I used MediaStore.EXTRA_OUTPUT for my picture capture…
3
votes
0 answers

Mirror the preview

public class AndroidCamera extends Activity implements SurfaceHolder.Callback { Camera camera; SurfaceView surfaceView; SurfaceHolder surfaceHolder; boolean previewing = false;; EditText txtData; String stringPath =…
Aswathy
  • 337
  • 2
  • 8
  • 18
3
votes
3 answers

How to save capture image with EXIF

i'm trying to capture image with android native camera, the save image is good but doesnt contain the usual EXIF data (gps tags, orientation...) what do i need to do to save also the EXIF? @Override public void onClick(View v) { …
Cohelad
  • 121
  • 9
3
votes
1 answer

Android get full size image from camera

I am developing an Android App which uploads an image from the camera or from the device photo gallery to remote site. The latter I have working fine, I can select and upload. However, I am have trouble taking a full size image and uploading. …
amburnside
  • 1,943
  • 5
  • 24
  • 43
3
votes
2 answers

Android add text to Picture and save

I want to place a Textiew to my picture and save it, but I'm not sure how to insert the text into the picture. I can attach an image on my picture save it, and it works but now I want to insert a Textiew into the picture. Here is my…
3
votes
2 answers

What data is returned when using ACTION_IMAGE_CAPTURE?

I'm getting a bit confused from this description: The caller may pass an extra EXTRA_OUTPUT to control where this image will be written. If the EXTRA_OUTPUT is not present, then a small sized image is returned as a Bitmap object in the extra…
EGHDK
  • 17,818
  • 45
  • 129
  • 204
3
votes
1 answer

Camera.Parameters device specific crash (Samsung S3 Mini)

The following code is working on a Galaxy Nexus, Samsung S3 and HTC One X but it crashes on a Samsung S3 Mini @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { Log.d(TAG, "entering surfaceChanged"); …
kannix
  • 5,107
  • 6
  • 28
  • 47
3
votes
1 answer

How to allow the Nexus7 use the front camera for scanning barcode when back camera is missing

I need to ask a questrion related to barcode scanning, I am using an app that scans barcodes and searches the web fr the results. Now this is my method where i create instance of my camera object /** A safe way to get an instance of the Camera…
3
votes
1 answer

Java/android cannot transfer byte array between activities

I'm trying to make an take photo application. there are surfaceview as a preview and button "Take photo" on the main activity. on the second activity there are textView for some picture info and imageView for displaying picture; I tried to trasfer…
theroom101
  • 599
  • 1
  • 9
  • 23
3
votes
2 answers

Capture a image and store it to the SD Card in new folder

I am calling the camera and capturing images, I will have to capture 10 images one by one and store them on SD card before I can set them to the Image view. Please check my below code, it does not set to the image view. How would I store it on the…
cavallo
  • 4,414
  • 9
  • 39
  • 61