Take images without closing camera in Android - android

I want to develop camera functionality for my app where I have to capture 10 images. The camera should not close, rather it should continuously take pictures while I hold the shutter button. I am using intent for opening the camera, but after taking one image the camera is stopping. How can I achieve the desired functionality?

You would need to write your own camera code, using android.hardware.Camera and/or the android.hardware.camera2.* classes. There is no Intent structure that camera app developers are required to support that handles your use case.

Related

Get the color of a pixel from camera intent

I am new with android studio and I have a question about camera.I have done the Take photo tutorial and now I have a button that opens my camera app. I want to take the color of a pixel from the camera app without saving the picture.
It is possible or I need to make camera API in order to take that color?
Any suggestion or tips about how I can make this project are welcomed.
Android camera intent either saves an image file, or it is cancelled. You need camera API approach to catch pixels without creating files. You can use a library like fotoapparat to wraps the tricky API for easy usage.

Android ACTION_IMAGE_CAPTURE auto focus on take picture

We were using Camera API for our custom camera application. However, it turned out to be a very hard problem. Many devices required extra testing as they seemed to perform unexpected behaviors. So, we have decided to migrate to Android's camera intent.
However, we are dealing with image retrieval tasks so, we don't want our users to send us blurry pictures. Previously, we were using autofocus as user taps on take picture button. Android camera intent performs worse than ours because it does not try to autofocus just before taking the picture. Android's camera does have such option but we don't want leave that decision up to our users because, they will probably will not select that option.
Is it possible to launch the camera intent with the option which auto focusses just before taking the picture? Thank you!
Is it possible to launch the camera intent with the option which auto focusses just before taking the picture?
No. The decision of whether or not to use auto-focus, or a flash, or any other camera feature, is between the user and the developers of the camera app. You do not get a vote.

Use front camera with built in camera app

In my app, I'm using the built-in camera app to take pictures.
The thing is that this interface has a button to change camera ( to front) and when I take a picture with front picture, it is not working anymore.
So, Is there a way to take picture fromt front camera with built-in camera app.
If it is not posible, is there a way to remove the icon from built in app???
Any suggestion will be appreciated!

capture photo from both front and back camera simultaneously

I would like to develop an Android application which has the technique of capturing a photo from camera(both front and back) at simultaneously.I searched over internet but unfortunately I couldn't find any better solution.
note for example if I capture the photo from back camera,once it captured from back means then it has to start front camera automatically for capture a photo.
You need to approach this problem step by step.
First build functionality to take picture by back camera.
Once you have done that, then build functionality to take picture by front camera (most of the code will be the same, just setting the back/font camera will be different.
Once you have these two options built, separately, then you can combine the two by making it a three-step process: 1) take picture by back camera 2) switch the camera to front 3) take picture by front camera.
Again, as mentioned, taking picture by back and front cameras are not different, it only involves switching the cameras.
Edited after seeing new comment:
If you are using the built-in camera, that is using intents, then this task is not going to be an automatic and immediate thing. I thought you were building custom camera, where you can do all this by code (without intents and built-in camera). But anyways, you can still do it.
So now, the process will be:
Use intent to go to Camera.
Take a picture (which is by default back camera). Do whatever you
want to do with this picture, save, process, etc.
Use another intent to go to Camera again. This time, add an extra to your intent to so the camera defaults to front camera intent.putExtra("android.intent.extras.CAMERA_FACING", 1);
Take picture again.
Refer to this thread for how to launch front camera with intent:
How to launch front camera with intent?

Taking picture without using Media Intent in android

I am developing an application where I have to take picture without using Media intent i-e without previewing this camera.How can I do this can anyone help me in this regard.
waiting for your reply
Altaf
You cannot take a picture without a preview. Whether it is the preview offered by the Intent or it is a preview that you create yourself with a SurfaceView when you use the Camera object, there has to be a preview.
Just use takePicture() directly on the camera object:
http://developer.android.com/reference/android/hardware/Camera.html#takePicture
I believe some of the older devices wouldn't capture correctly unless preview was setup, but I don't think that's an issue any more. And if you are looking to target devices that require preview you can just resize the preview surface to a single pixel somewhere and put another control on top of it. Still eats resources, but shouldn't be visible.

Categories

Resources