Capture
Provides access to the audio, image, and video capture capabilities of the device.
Objects
Capture
CaptureAudioOptions
CaptureImageOptions
CaptureVideoOptions
CaptureCB
CaptureErrorCB
ConfigurationData
MediaFile
MediaFileData
Methods
capture.captureAudio
capture.captureImage
capture.captureVideo
MediaFile.getFormatData
Scope
The capture object is assigned to the navigator.device object, and therefore has global scope.
// The global capture object
var capture = navigator.device.capture;
Properties
supportedAudioModes: The audio recording formats supported by the device. (ConfigurationData[])
supportedImageModes: The recording image sizes and formats supported by the device. (ConfigurationData[])
supportedVideoModes: The recording video resolutions and formats supported by the device. (ConfigurationData[])
Methods
capture.captureAudio: Launch the device audio recording application for recording audio clip(s).
capture.captureImage: Launch the device camera application for taking image(s).
capture.captureVideo: Launch the device video recorder application for recording video(s).
Supported Platforms
Android
BlackBerry WebWorks (OS 5.0 and higher)
capture.captureAudio
Start the audio recorder application and return information about captured audio clip file(s).
navigator.device.capture.captureAudio(
CaptureCB captureSuccess, CaptureErrorCB captureError, [CaptureAudioOptions options]
);
Description
This method starts an asynchronous operation to capture audio recordings using the device's default audio recording application. The operation allows the device user to capture multiple recordings in a single session.
The capture operation ends when either the user exits the audio recording application, or the maximum number of recordings, specified by the limit parameter in CaptureAudioOptions, has been reached. If no value is provided for the limit parameter, a default value of one (1) is used, and the capture operation will terminate after the user records a single audio clip.
When the capture operation is finished, it will invoke the CaptureCB callback with an array of MediaFile objects describing each captured audio clip file. If the operation is terminated by the user before an audio clip is captured, the CaptureErrorCB callback will be invoked with a CaptureError object with the CaptureError.CAPTURE_NO_MEDIA_FILES error code.
Supported Platforms
Android
BlackBerry WebWorks (OS 5.0 and higher)
Quick Example
// capture callback
var captureSuccess = function(mediaFiles) {
var i, path, len;
for (i = 0, len = mediaFiles.length; i < len; i += 1) { path = mediaFiles[i].fullPath; // do something interesting with the file } }; // capture error callback var captureError = function(error) { navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error'); }; // start audio capture navigator.device.capture.captureAudio(captureSuccess, captureError, {limit:2}); Full Example
Sunday 26 June 2011
camera tutorial (phonegap)
2012Latest
Labels
- android info (16)
- android material (17)
- android news (7)
- android tutorial (28)
- downloads (13)
- e-books (3)
- html info (4)
- javascript (4)
- jquery (18)
- json (2)
- miscrosoft dev (1)
- phonegap info (11)
- php (3)
- seo (1)
- sql (3)
Blog Archive
-
▼
2011
(123)
-
▼
June
(40)
- Simple Android Developer Mistakes
- It’s very easy to send email via an Android intent...
- Upload a File to a Remote Server with Phonegap
- PHP Send Email Using Authenticated SMTP Mail Serve...
- Re: [PhoneGap] how to add get applicationDidBecome...
- [nodejs] Joey Guerra wants to chat
- [PhoneGap] Re: iOS UIWebview - make it faster for ...
- Re: [nodejs] Joey Guerra wants to chat
- [PhoneGap] Re: Calling plugin method synchronously
- Re: [PhoneGap] Coverage Into using Phonegap.
- [PhoneGap] Re: BlackBerry WebWorks - eclipse Issues
- [PhoneGap] Re: how to add get applicationDidBecome...
- [PhoneGap] Re: emailComposer plugin
- jquery basics
- jquery tutorial
- SQL Subquery
- Basic sql injection for beginner with a live example
- The best Web 2 jQuery javascript plugins
- How to create and read JSON strings in PHP
- How to create and read JSON strings in JavaScript
- Form Validation with JavaScript
- Using Camera API with only Embedded Visual C++ 4.0...
- InnerHTML and Select option in IE
- SQL Server Tutorials on Date Time
- camera tutorial (phonegap)
- Diet mixers make people drunk faster
- android e-book
- Step 1. Preparing Your Development Computer Befor...
- android sdk
- basic of gps
- gps
- core jquery
- gps co-ordinate with sattelite
- Android User Interface Development: Beginner's Guide
- Improve your jQuery - 25 excellent tips
- google map tutorial
- gps jquery
- What is jQuery GPS?
- plugins for google map
- jquery for gps
-
▼
June
(40)
Total Pageviews
copyright@kaushikpatel. Powered by Blogger.
Followers
Popular Posts
-
PHP has mail() function to send an email to users. However this mail() will not work:=> If sendmail (or compatible binary) is not inst...
-
The latest U.S. smartphone market share data from comScore shows an interesting twist compared to global data. Fast growth in emerging ma...
-
I would really like to write more tips, tricks, and tutorial posts relating to Android, but I’ve been extremely busy on apps both professi...
-
This is part 2 of my posts on an update of Texas DWI related legislation considered by the 82nd Texas Legislature that affect an Austin DWI ...
-
Android Tutorial-Making a custom Android button using a custom view Creating a custom view is as simple as inheriting from the View class...
-
http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareIndex.jsp?lang=en&cc=us&prodNameId=3957664&prodTypeId=321957&prodSe...
-
On 9th January, 2007, Apple officially launched the iPhone, and the world of user interface design shifted. While tablet PCs had been aroun...
-
http://moviesmobile.net/hollywood-mobile-movies/index.php
-
I recently started looking at PhoneGap as a way to build native smartphone applications without having to learn another programming langua...
Copyright © 2011 Android Information | Powered by Blogger