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

Android: Saving taken picture to Imagefolder

I just want to save a picture in my Imagefolder in my phone. I have got 2 examples which I tried. 1. Example My app crashes when I activate the onClick Method: public void onClick(View arg0) { Intent cameraIntent = new…
csnewb
  • 1,190
  • 2
  • 19
  • 37
0
votes
1 answer

HTC Wildfire S, intent of camera capture has a duplicate copy in Gallery in addition to the specified output in ContentProvider

For security reason, I do not want the photo saved in the sdcard. So after searching, I find a way to save the photo in the intenral storage. The code snippet is as below: Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); photo = new…
user1914692
  • 3,033
  • 5
  • 36
  • 61
0
votes
0 answers

Crop Photo in Android

What I am aiming for is to take images with an intent with the Android camera and then let the user crop the image. The problem is that I am looking to get a circular image (preferably a transparent background .png. Here is an example: I haven't…
EmilioSG
  • 380
  • 3
  • 5
  • 18
0
votes
1 answer

bitmap crashing when trying to convert camera-intent image to grayscale byte array

What I am trying to do, is to take a photo using a camera intent, retrieve and convert said photo to a grayscale byte array (note: I am not interested in getting a grayscale image, just need the byte data). Then finally, apply a threshold and…
user2517252
0
votes
1 answer

Disable shutter sound of camera in android device

I have written a simple application in which the user can: press a button to open the camera application take pictures with the camera application Is there any way to disable the shutter sound of the camera from my code? I currently hold an Orange…
Ravul
  • 285
  • 6
  • 19
0
votes
1 answer

Camera reference is causing problems

So, I wanted to create a social networking page for the user where they would have on screen button options to bring them to their social networking option of choice, and on this screen I decided to include a reference to the camera, but when I…
0
votes
1 answer

Take Picture from camera and crop it

I tried to take a picture with the camera and crop it after that. For this is use this code: @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); …
Cilenco
  • 6,951
  • 17
  • 72
  • 152
0
votes
2 answers

Android camera intent kills my activity

I want to set my profile image using the camera, but my Activity is killed sometimes when startActivityForResult with ACTION_IMAGE_CAPTURE. camera run successfully, i can take picture. but when i press save button after take picture, sometimes my…
0
votes
1 answer

Picture does not save to gallary after taking photo from the my camera application

I have to take a photo from camera application and send it to a mail. My problem is when i take the photo from my camera application it does not save it to gallery .And when i use the function getlastimageid(it takes the address of the last image…
0
votes
1 answer

Storing image taken from camera

I can take a picture via the following intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(cameraIntent, CAMERA_PIC_REQUEST); Then in the onActivityResult method I set the…
kabuto178
  • 3,129
  • 3
  • 40
  • 61
0
votes
1 answer

Android - Taking photos/video and saving them with a custom name to a custom destination via Intent work on some devices only why?

This is the code i use to create the Intent: try { file = createImageFile(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); …
Tobiel
  • 1,543
  • 12
  • 19
0
votes
0 answers

Camera Intent is null when supplying uri

First I did look at other questions regarding this but they say to do what I am doing. I am trying to launch the camera to take a picture like this PackageManager pm = getPackageManager(); …
tyczj
  • 71,600
  • 54
  • 194
  • 296
0
votes
1 answer

Android circular crop image using com.android.camera.action.CROP returning black image in HTC devices

In my application user can select image from camera or gallery in android. After selecting image, user can also crop circular image from that original image. But after circle cropping, I am getting black rectangle image from that in HTC…
Mihir Shah
  • 1,799
  • 3
  • 29
  • 49
0
votes
4 answers

How can i create Internal folder in my app?

How can I create internal folder in my application to put the image captured in it after that get the image folder path ???
0
votes
2 answers

Capturing image via camera hardware is not working properly?

I am trying to use camera hardware to capture list of images. But while launching the Camera View the view doesn't looks like usual. The screen shot is attached below. I am testing this in HTC Sensation running android 4.0.3. Image ScreenShot while…
vinothp
  • 9,939
  • 19
  • 61
  • 103