Android Camera面对前端不工作在模拟器 [英] Android Camera facing front not working in emulator
本文介绍了Android Camera面对前端不工作在模拟器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在开发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,
Device Ram Size:512,
...
...
Configures Camera facing front : webcam0, Device Ram Size: 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 值 false 和 rearCam 值为 true 。
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
添加配置相机正面
设置所需的选项
并运行您的项目。
希望这有助于。
谢谢。
这篇关于Android Camera面对前端不工作在模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文