0

嗨朋友们,我已经为使用 flash as3 的 web 应用程序创建了一个相机应用程序。它工作正常,并使用 Camera.getCamera(); 的相机类;现在我想为 android 创建同样的应用程序。我只有带有前置摄像头的安卓设备。所以我在我的设备中运行了同一个应用程序。我看不到相机显示。我可以使用任何选项来访问设备上的前置摄像头吗?

4

2 回答 2

1

使用文档!Camera.getCamera() 的描述指出:

Parameters
name:String (default = null) — Specifies which camera to get, as determined from the array returned by the names property. For most applications, get the default camera by omitting this parameter. To specify a value for this parameter, use the string representation of the zero-based index position within the Camera.names array. For example, to specify the third camera in the array, use Camera.getCamera("2"). 

因此,如果您想要第二台相机,请使用

Camera.getCamera("1")

于 2013-01-07T12:26:09.200 回答
0

摄像头索引是定义后置摄像头或前置摄像头的数字。第一个索引可以是后置摄像头,第二个项目可以是前置摄像头,反之亦然。

如果我猜的话,我会说你使用Camera 类..这个博客上的帖子为你提供了更多信息

愿这对你有帮助..!

于 2013-01-07T08:57:08.887 回答