开发者

How to start the camera directly from a web page in 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 p开发者_JS百科osible (and how) to have the camera app in this list? Or do I maybe need a special app for this?

Thanks in advance!


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">

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


Check out PhoneGap. The included example includes the camera. The full set of PhoneGap camera API's is documented here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜