您可以从 Html 5 Web 应用程序启动本机相机应用程序吗? [英] Can you launch the native Camera App from an Html 5 Web App?

查看:42
本文介绍了您可以从 Html 5 Web 应用程序启动本机相机应用程序吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个移动网站,允许用户使用文件输入类型(浏览按钮)上传照片.如果可能,我想通过单击浏览"按钮或任何其他 HTML 按钮启动 Android 设备的相机应用程序.这可能吗?

I have a mobile website that allows users to upload photos using the file input type (Browse button). If possible, I would like to launch the Camera App of an Android device on click of the Browse button or any other HTML button. Is this possible?

我读过类似的帖子 但在他们的示例中,他们询问如何将相机应用程序注册为意图接收器以上传图像.与此类似,我只想以与 Android 浏览器获取电话号码和地址相同的方式启动相机应用程序.

I read this similar post but in their example they are asking how to register the Camera App as Intent Receiver for uploading images. Similar to that, I just want to launch the Camera App in the same way the Android browser picks up on Phone Number and Addresses.

推荐答案

Android 3.0 Honeycomb 添加了 设备 API 支持.Google I/O 2011 年演示文稿 显示了幻灯片 30 上的示例:

Android 3.0 Honeycomb added Device API support. Google I/O 2011 presentation shows an example on slide 30:

<input type="file" accept="image/*;capture=camera">

它还指向一个测试站点,这在我的 Froyo 手机上没有太大作用.

It also points to a test site that not surprisingly does not do much on my Froyo phone.

任何人用平板电脑试过了,能告诉我们它有什么作用,没有什么作用?

Anybody with a tablet tried it and can tell us what it does and does not do?

4.0 冰淇淋三明治是 宣布.代码丢失可能不会发生 几个月更长的时间,实际设备可能会在圣诞节前后出现在市场上.至于当前一代 Froyo/Gingerbread 手机上的 Icecream,官方 ODM/carrier 4.0 版本永远不会发生?我很想在这方面被证明是错误的.来自自定义 ROM 社区的任何消息?

4.0 Icecream Sandwich was announced. Code drop may not happen for several months or longer and actual devices may show in the market around Christmas. As to Icecream on current generation of Froyo / Gingerbread phones, official ODM/carrier 4.0 releases will never happen? I'd love to be proved wrong on this. Any word from custom ROMs community?

这篇关于您可以从 Html 5 Web 应用程序启动本机相机应用程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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