3

我尝试使用以下方法从 Android 手机获取图像:

<input type="file" name="file_camera" accept="image/*" capture="camera" />
  • Android 2.x:capture忽略该属性,允许Gallery & File Manager 应用程序进行选择。
  • Android 4.x:capture尊重属性,允许Camera应用选择。

如果该属性不存在 ( <input type="file" name="file_camera" accept="image/*" />),结果如下:

  • Android 2.x:仅允许选择图库和文件管理器应用程序
  • Android 4.x:允许选择相机、图库和文件管理器应用程序

如何在 Android 2.x 中安装摄像头?另外,该属性的其他值是capture什么?

笔记:

  • 使用默认浏览器。Chrome 也有同样的结果。
  • 在 Firefox 中,Android 2.x 和 4.x 可以从相机、图库和文件管理器应用程序中进行选择。
4

1 回答 1

0

在低级别,您通过在 Android API lvl 8 (Android 2.2+) 中实现的 android.media.CameraProfile 类捕获图像

我认为 Mobile Safari 4(默认浏览器)没有实现捕获,因为 MS v4 在 Android 2.0+(API 级别 5+)上可用并且不能这样做。

Firefox 是一个单一的低级应用程序,它可以从一个 API 级别更新到另一个 API 级别。Android 2.xx 的最高 API 级别为 10。

并且不要忘记 Mobile Safari 使用 Webkit、FF - Gecko。

于 2013-10-31T17:35:06.090 回答