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

Showing half of the image in the viewfinder for Android Application

I am trying to make an application that, while the camera on the phone is running, only shows half of what the view finder sees. I have tried reading the documentation on accessing the camera hardware, however I am new to development and can't make…
0
votes
2 answers

How to convert captured image to GIF and save to sd card in android

I am using custom camera and i want to capture 3 images in burst mode and save it to sd card as a animation. which has extension as .gif and combines that 3 captured frames in it. Also want to save the image capture time in database.
0
votes
2 answers

Taking a picture via camera intent in Android

I am using the following code for clicking a photo on Button click. package com.example.clickpic; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import…
SoulRayder
  • 5,072
  • 6
  • 47
  • 93
0
votes
0 answers

where the capture image store in android

I'm new to android, and I can't find a solution. Please solve my error. In this code, use intent for camera and after capture image it set to image view but the path of image from intent returns a null pointer exception. Why does it return…
user3157523
  • 1
  • 1
  • 1
0
votes
2 answers

Google Glass GDK CameraManager Intent

Does anyone know if when you use the GDK Cameramanager Intent to take a picture, is there a way to not show the preview or close it automatically? Capturing an image for use in app and don't want to have to tap to accept. I probably have missed…
TheMadAdmin
  • 141
  • 1
  • 6
0
votes
1 answer

Taking image from native camera without a sdcard

I am trying to write a application which i will take image from camera and use it. At first i used Bitmap image = (Bitmap) data.getExtras().get("data"); However i noticed that this will just return thumbnail of the image. So i updated my code…
Yiğit Doğuş Özçelik
  • 2,763
  • 2
  • 16
  • 19
0
votes
2 answers

Camera intent throws Null Pointer Exception in Sony Phones

I'm intenting Camera Intent which works perfectly on other devices except Sony C2305 [4.2.2]. Tested on 4.2.2 Emulator which works perfectly fine. Following is the snippet . I uses to call Camera Intent Intent intent = new…
Vikalp Patel
  • 10,669
  • 6
  • 61
  • 96
0
votes
1 answer

No Activity found to handle Intent { act=android.media.action.IMAGE_CAPTURE (has extras) }

Why I could receive this crash? I check the report in crittercism and the device affected was a GT-I9300 (Samsung S3) in 4.2.2. It's only one report in about 2500 daily users. java.lang.RuntimeException: Unable to start activity…
0
votes
1 answer

Android Camera Intent on Glass - Save image in custom file path

I have the following code in an Android activity where I am trying to save an image with a custom file name. I tried copying code for this from the top answer on this post: Android - Taking photos and saving them with a custom name to a custom…
0
votes
2 answers

UnsupportedOperationException Error while opening camera android

I am doing an Android application which need to open camera and display picture on screen and take that picture absolute path. But I always get "UnsupportedOperationException: Unknown URI: content://media/external/images/media" error when I click on…
0
votes
2 answers

OutOfMemoryError when using Camera Intent

I am using camera Intent to take a photo and populate it to ImageView. I got an error whenever I take another photo from the camera Intent. It works well when I am only taking one photo but on second attempt without killing the application, the…
thhVictor
  • 338
  • 6
  • 25
0
votes
2 answers

startActivityForResult returning without calling onActivityResult

I am trying to capture a photo and save it in SD card. Image uri is generated and when I invoke startActivityForResult it is returning without calling onActivityResult. private Uri dispatchTakePictureIntent() { Uri uri = null; Intent…
0
votes
1 answer

camera not saving image on sd card (sometimes work)

i want to call camera in my app to take a picture and save it in sdcard... my code works sometime and not working sometimes.. i can't understand why? here is my code public class MainActivity extends Activity { int TAKE_PHOTO_CODE = 0; public…
0
votes
1 answer

Selecting image does not return to my app

I'm accessing the gallery and camera via a seperate intent using the following code: final Intent galleryIntent = new Intent(Intent.ACTION_GET_CONTENT); galleryIntent.setType("*/*"); startActivityForResult(galleryIntent, 0); Intent intent = new…
Luke Villanueva
  • 2,030
  • 8
  • 44
  • 94
0
votes
1 answer

EXTRA_VIDEO_QUALITY does not set the video quality

I am working on android automation and trying to set video quality by adb command. I am using follwing command: adb shell am start -a android.media.action.VIDEO_CAPTURE --ei android.intent.extras.CAMERA_FACING 1 --ei…
Lost
  • 12,007
  • 32
  • 121
  • 193