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

capture image from camera and send it directly to server

I'm trying to write a small code that allows me to send picture directly after taking it from the camera, I mean when I take picture from the camera, this picture will be sent directly to the server without to store in my phone or in the sdcard, So…
theo theo
  • 131
  • 1
  • 3
  • 10
4
votes
3 answers

How to open default camera without showing chooser?

How to open default camera in your application? I don't want to open chooser for it (its client's requirement). I am using this intent android.media.action.IMAGE_CAPTURE and calling activity for result. Everything is fine but apps like Line Camera,…
Nauman Zubair
  • 1,208
  • 15
  • 27
4
votes
1 answer

Why a set android Image disappears?

I'm trying to post an image captured from Camera , i'm using following code Intent i = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(i, REQ_CODE_PHOTO_TAKE); inside onActivityResult i wrote this code Bitmap photo = (Bitmap)…
4
votes
1 answer

Can't get image from camera with intent chooser on 4.2.2 AVD

I'm working on a part of my application that allows a user to select an image either from camera or from gallery, using an Intent chooser. It's working fine on my 2.2.1 android phone, but when i compile it on a 4.2.2 AVD it returns a null pointer…
Hossam Oukli
  • 1,296
  • 3
  • 19
  • 42
4
votes
0 answers

intent ACTION_IMAGE_CAPTURE kills activity and app Android 4.1

I have a Galaxy Tab 2 7.0 GT-P3110, and something strange happens when I try to access the camera with intent. In one activity I have 20 buttons that call the intent to access the camera, but the activity falls randomly. Sometimes the photograph…
Jonathan Toledo
  • 359
  • 4
  • 19
4
votes
3 answers

java.Lang.RuntimeException, setParameters failed in android(4.1.1) version

I have developed an application which captures a photo when punch in at the time. It's working good on Acer tab(capturing image and saves in sdcard). Now when I run the same application in Samsung Galaxy(Android-4.1.1) My app is getting…
4
votes
0 answers

jelly-bean video intent not returning after capture

I am working with Samsung Galaxy Tab 2 running Android 4.1.1 (Jelly-bean), I recently upgraded from 4.0.4 (Ice Cream Sandwich). I used the ACTION_VIDEO_CAPTURE action of MediaStore to capture videos in my activity. Uri uriSavedVideo =…
skv
  • 1,793
  • 3
  • 19
  • 27
4
votes
2 answers

Android onActivityResult data parasm return null using camera

I would like ask some help about using camera app. First I read everything Android Developer API guides After I tried to create my first app whicj is using camera. I copy all source code but unfortunatly I conflict a problem: onActivityResult data…
aBanhidy
  • 257
  • 1
  • 3
  • 11
4
votes
1 answer

How to get the orientation type when capturing image via Intent?

I am stuck with a problem, when capturing image via intent. I am using the default intent code for capturing image. as follows. Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(intent,…
Himanshu
  • 1,066
  • 6
  • 19
  • 44
4
votes
2 answers

How to set camera resolution using intent ?

My app is using this Intent to take photos: Intent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); i.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, saveUri); startActivityForResult(i, cameraData); Is there any way to set the…
voimak
  • 311
  • 1
  • 3
  • 7
4
votes
1 answer

Android: How to capture image without showing preview

I am using the following code to capture the image in Android Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(cameraIntent, 100); After capturing an image, its showing a preview and asking…
M S
  • 3,995
  • 3
  • 25
  • 36
4
votes
2 answers

startActivityForResult() in low memory situations

I'm developing a phonegap application that uses the camera. In low memory situations, when the camera is launched, my application is killed by the system, sometimes without calling onDestroy() method (now I know that only onPause() is guaranteed). I…
4
votes
2 answers

Activity recreated when returning from camera app

This issue is only occurring on two older Samsung Galaxy models, but is nevertheless very reproducable. I have a simple app that displays a photo that is taken through the device's camera app. It has one button to start that app, and processes the…
3
votes
1 answer

Initiate Camera Intent with the Gallery Icon

I am working on an app that accesses the camera and returns an uri, which I pass to another activity and display the extracted bitmap in an ImageView. Everything seems to work fine. Here is the code that I use to initiate the camera…
Abhijit
  • 4,853
  • 3
  • 30
  • 33
3
votes
1 answer

Exception delivering result on ACTION_IMAGE CAPTURE (taking photo from third party app)

My app has a form where it is required to either select a picture from the gallery or to take a photo. For that purpose, there are two buttons. The one doing the gallery pick is working fine. The problem comes with the one that lets you take a…