I fired up the newly released Android 3.0 SDK to run some tests and found they’ve implemented part of the long-awaited Device API (aka the Media Capture API). From your browser you can now upload pictures and videos from the camera as well as sounds from the microphone. The returned data should be available to manipulate via the File API (although I haven’t yet tested this).
I made a short video demo with some explanation:
Here’s the code so you can play around with it for yourself!
<form enctype="multipart/form-data" method="post"> <h2>Regular file upload</h2> <input type="file"></input> <h2>capture=camera</h2> <input type="file" accept="image/*;capture=camera"></input> <h2>capture=camcorder</h2> <input type="file" accept="video/*;capture=camcorder"></input> <h2>capture=microphone</h2> <input type="file" accept="audio/*;capture=microphone"></input> </form>
[...] This post was mentioned on Twitter by Lim Chee Aun, john Allsopp, David Calhoun, François-G. Ribreau, HN Firehose and others. HN Firehose said: Android 3.0 Honeycomb is first to implement the Device API: http://bit.ly/e6UEYS [...]
[...] are currently in use, though he says that the W3C Device API is "a move in that direction," that is the first to implement parts of the Device API. Another alternative is PhoneGap, which Nyman says has been "tremendously useful," but it isn't [...]
[...] in use, though he says that the W3C Device API is “a move in that direction,” that is the first to implement parts of the Device API. Another alternative is PhoneGap, which Nyman says has been “tremendously useful,” but [...]
[...] are currently in use, though he says that the W3C Device API is "a move in that direction," that is the first to implement parts of the Device API. Another alternative is PhoneGap, which Nyman says has been "tremendously useful," but it isn't [...]
[...] though he says that the W3C Device API is “a move in that direction,” that’s the primary to implement parts of the Device API . Another alternative is PhoneGap , which Nyman says have been “tremendously useful,” [...]
[...] API is “a move in that direction.” Android Honeycomb is the first to implement parts of t&#…. Another alternative is PhoneGap, which Nyman says has been [...]
[...] is Android 3.0+ (Honeycomb) is the first of the major mobile browsers to implement the Capture API:http://davidbcalhoun.com/2011/an…GPS data is simply EXIF data that is captured if the user or the device has it enabled (an option on [...]
[...] tells a user agent where to get the input data. Android extends the accept attribute. See more in David Calhoun’s Device API article. Alternative capture arguments are camcorder (for video), microphone, and [...]
This is the wrong way of marking it up. It should say:
capture is a separate attribute from accept.
http://www.w3.org/TR/html-media-capture/
And input does not need a closing tag.
Your form ate my html. Imagine some less than symbols.
input type=”file” accept=”image/*” capture=”camera”
[...] – pushing borders of Web applicationsThe Methodology Behind Ringmark – Facebook DevelopersAndroid 3.0 Honeycomb is first to implement the Device API | David Calhoun’s Developer BlogStarbucks Style Guide Tagged in bdconfLeave a ReplyClick here to cancel reply. [...]
[...] Using Android Camera in HTML Apps (David Calhoun) — From your browser you can now upload pictures and videos from the camera as well as sounds from the microphone. The returned data should be available to manipulate via the File API (via Josh Clark) [...]
I used to be very happy to seek out this internet-site.I needed to thanks in your time for this excellent learn!! I undoubtedly having fun with each little bit of it and I have you bookmarked to take a look at new stuff you weblog post.
[...] via Android 3.0 Honeycomb is first to implement the Device API | David Calhouns Blog. [...]
[...] I wrote this demo after reading David Calhoun’s post about Android implementing device APIs. [...]
[...] See more inDavid Calhoun’s Device API article. Alternative capture arguments are [...]