前置摄像头的Andr​​oid模拟器中不工作 [英] Android Camera facing front not working in emulator

查看:232
本文介绍了前置摄像头的Andr​​oid模拟器中不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发Android应用程序。要运行我的应用程序创建了以下配置设置(我想设置的摄像头为前置摄像头)。

I am developing android application. To run my application I created emulator with the following configuration settings(I want to set webcam as front camera).

配置前置摄像头:webcam0,
设备RAM大小:512,
...
......

但是,当我检查是否前置摄像头可用,

But when I checked if front camera available,

PackageManager pm = getPackageManager();
frontCam = pm.hasSystemFeature("android.hardware.camera.front");
rearCam = pm.hasSystemFeature(PackageManager.FEATURE_CAMERA);

我得到的 frontCam rearCam 真正

AVD截图如下。如何使用网络摄像头作为前置摄像头?

AVD screenshot is given below. How can I use webcam as front camera?

推荐答案

你配置了AVD为配置前置摄像头

如果没有,那么编辑您的AVD或创建新的

if not then Edit your AVD OR Create new

添加提供配置前置摄像头。

Add Configures Camera Facing Front

设置所需的选项。

和运行项目。

希望这有助于。

编码愉快。谢谢你。

这篇关于前置摄像头的Andr​​oid模拟器中不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆