Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/211.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在android中打开默认摄像头?_Android_Android Intent_Android Camera - Fatal编程技术网

在android中打开默认摄像头?

在android中打开默认摄像头?,android,android-intent,android-camera,Android,Android Intent,Android Camera,我搜索了很多,但没有找到任何解决方案。我想打开android设备的默认摄像头,这样我就可以拍摄图像和视频了。我已经厌倦了使用: Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(intent, ACTION_IMAGE_CAPTURE); 或 但使用此摄像头只能在图像或视频捕获模式下的一种模式下打开。我想打开默认相机请不要建议使用Surface

我搜索了很多,但没有找到任何解决方案。我想打开android设备的默认摄像头,这样我就可以拍摄图像和视频了。我已经厌倦了使用:

Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent, ACTION_IMAGE_CAPTURE);

但使用此摄像头只能在图像或视频捕获模式下的一种模式下打开。我想打开默认相机请不要建议使用Surface View支架。

非常感谢你的建议

Please don't suggest using Surface View holder.

不能
这样做。两次都是在
中一次
。你可以打开图像或视频。你应该为选择一个视频或图像设置警报

为此,您必须获得本地交互。搜索高通公司的增强现实示例应用程序。因为他们是通过本机而不是通过Android的摄像头api打开摄像头的。

是累了还是累了??请更正。我认为Android不允许这样做。谢谢你的回复Samir,但我知道,这是最后一个选项:)你是它的last选项,但可以在没有surfaceview的情况下创建
Please don't suggest using Surface View holder.