Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
232 views
in Technique[技术] by (71.8m points)

android - Can you launch the native Camera App from an Html 5 Web App?

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?

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...