开发者

How to capture **Video and Photo** at same time in an activity

开发者 https://www.devze.com 2023-03-15 19:56 出处:网络
I want to take video and photo at same time. I have two buttons. When user click on one it have to take video and

I want to take video and photo at same time.

I have two buttons.

  1. When user click on one it have to take video and

  2. Another button then it have to stop recording video and take photo.

Now I am trying recorder and camera but its not working fine ,

Also note not both in same time 开发者_JAVA百科i want to do one after another vice versa ..

What is a good idea for this?


If your recording video then, you could when the button is pressed, calculate the frame of the video that corresponds to the time the button was pressed then just pull that frame out of the video file and use that as your image. I've never done it on android, but it should be possible.

EDIT: have a look at the previewcallback() in camera:

http://developer.android.com/reference/android/hardware/Camera.PreviewCallback.html


Don't think it's possible. Camera and recorder will not work together because they both block camera and don't allow other apps' recorders and cameras (and each other) to use camera at the same time.

0

精彩评论

暂无评论...
验证码 换一张
取 消