如何直接从Android的网页启动摄像头 [英] How to start the camera directly from a web page in android

查看:466
本文介绍了如何直接从Android的网页启动摄像头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试着做一个web应用程序为Android,我可以上传图片。 我有一个文件上传字段的网页。当我按下按钮,我可以选择哪些应用程序,我想用它来选择要上传的文件。它是更多钞票(以及如何)都在此列表中的相机应用?或者,我也许需要为这个特殊的应用程序吗?

Im trying to make a webapp for Android in which i can upload pictures. I have a web page with a fileupload field. When I push the button I can choose which app i would like to use to choose the file to upload. Is it posible (and how) to have the camera app in this list? Or do I maybe need a special app for this?

在此先感谢!

推荐答案

下面是code以获得进入新的照相机API在Android的3+和iOS 6。

Here is the code to get access to the new camera api's in android 3+ and iOS 6.

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

这将允许你拍一张新照片或选择一个从设备库,然后将其上传到一个web应用程序。

This will allow you to take a new picture or select one from the device library and then upload it to a web app.

这篇关于如何直接从Android的网页启动摄像头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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