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
4
votes
0 answers

Camera intent without external storage permission with photo publicly available

all I want is: intent for taking picture by camera app; taken photo will be available to user publicly - outside my app, even after app uninstall, ideally in the same dir & name as photos taken normally; I will be able read the photo once after…
hrach
  • 2,443
  • 2
  • 26
  • 37
4
votes
2 answers

How to generate notification when a new picture is taken by camera app?

I want to create a notification from my app when a new picture is taken from the camera app. I want to achieve this when my app is not running. I am using Broadcast receiver to do this. Here is my Code... In Android Manifest..
4
votes
2 answers

android custom camera stretched surfaceview

i am facing a problem with the camera view i.e the view of camera is coming stretched and not giving a normal view like the default camera app or any other camera app gives. I have been unable to get the surface view which the camera uses to stretch…
4
votes
1 answer

How to detect if photo was taken (camera intent)

I want to send a photo taken by camera intent. Camera works fine I have path from mMediaUri.getPath() (it's correct) I have method to send it (postImage()) (works fine) When I start an Intent, camera is showing up, but method postImage is not…
4
votes
3 answers

Gallery intent shows only image or video not both?

I am trying to allow a user to choose an image or video from his device, and currently it only shows video or image depending what is written first in the following code: Intent galleryIntent = new Intent(Intent.ACTION_PICK,…
Lion789
  • 4,402
  • 12
  • 58
  • 96
4
votes
2 answers

Get image from camera without pressing ok button after camera click in android

I did code for capturing the image from camera and it works fine, After capturing the image it is asking for click ok in camera but i want to get image without clicking on ok button. my code for is as below and i don't have idea to get image…
Rajesh Panchal
  • 1,140
  • 3
  • 20
  • 39
4
votes
2 answers

Save image from Camera take picture intent to application private storage

There is a lot of information here about how to create a file on external storage in android, pass the uri to ACTION_IMAGE_CAPTURE and then save the image there. However, I want to create a file in Application's private storage (sometimes referred…
Kaloyan Roussev
  • 14,515
  • 21
  • 98
  • 180
4
votes
3 answers

Can't receive Intent.extras() from Camera after making a photo

I found it's a common problem with capturing photo and receiving full size photo instead of thumbnail (according to: http://developer.android.com/training/camera/photobasics.html ). Taking photo and receiving thumbnail is easy, but rest of tutorial…
jean d'arme
  • 4,033
  • 6
  • 35
  • 70
4
votes
5 answers

how to set camera Image orientation?

In my application I have added feature of image uploading,It works fine with all the Images except camera image,whenever I browse camera image from gallery and portrait image rotate in 90 degree..following is my snippet code..can anyone help me?I…
parajs dfsb
  • 145
  • 2
  • 4
  • 13
4
votes
2 answers

Camera intent gives null at onActivityResult

I am working on Android application in which I am getting image from gallery and camera. For gallery image I am getting perfectly intent values at onActivityresult but on camera when I want to get intent.getData() for Uri it gives Null value. My…
Usman Khan
  • 3,739
  • 6
  • 41
  • 89
4
votes
2 answers

Capture Low resolution video in android via intent camera

How can i record low resolution videos in andorid to upload to server why because recorded videos in android is havin 3 MB in size even of 3 sec video.i have searched all way please help me out
kondal
  • 358
  • 1
  • 6
  • 22
4
votes
1 answer

Force to capture video in Landscape

I am trying to insist user to use Landscape mode while capturing video. Question 1: Can I force user to use landscape mode while video capturing? Question 2: Can I show some overlay image or alert to suggest the user for landscape mode when user…
4
votes
1 answer

How to choose “front camera” on new intent?

Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); intent.putExtra("android.intent.extras.CAMERA_FACING", 1); startActivityForResult(intent, CAMERA_REQUEST); My code is this above, my device is LG Nexus 4 with 4.4.2. Intent…
Danilo
  • 199
  • 1
  • 2
  • 12
4
votes
5 answers

Taking picture with camera intent rotate picture in portrait mode android

Picture was taken successfully with camera but in portrait mode on samsung galaxy s3 the picture gets rotated. How can i solve this issue. Camera intent is as follows: Intent intent = new Intent("android.media.action.IMAGE_CAPTURE"); …
user3115198
  • 107
  • 2
  • 3
  • 8
4
votes
1 answer

Camera intent onActivityResult code saves (blank) image even if photo was not accepted by user

When the user clicks the cross to not accept the photo, it ends the intent in the same way it does when they accept the photo they took. It saves a file to the device gallery. But it's blank. Shouldn't clicking the cross mean that resultCode !=…