record Methods
The record
object supports the following methods.

Starts recording audio.
Syntax
startRecording();
Example
function errorcallback(errorMessage) { var errorMesg = "Reason for the failure is: " + errorMessage; alert(errorMesg); } function successcallback(fileobj) {} var fileObj = new kony.io.file("recording"); var config = { onSuccess: successCallback, onFailure: failureCallback }; var recordObj = kony.media.record(fileobj, config); recordObj.startRecording();
Parameters
None
Return Values
None
Platform Availability
- Android
- iOS

Stops the current recording.
Syntax
stopRecording();
Example
function errorcallback(errorMessage) { var errorMesg = "Reason for the failure is: " + errorMessage; alert(errorMesg); } function successcallback(fileobj) {} var fileObj = new kony.io.file("recording"); var config = { onSuccess: successCallback, onFailure: failureCallback }; var recordObj = kony.media.record(fileobj, config); recordObj.startRecording(); // More code goes here. recordObj.stopRecording();
Parameters
None
Return Values
None
Remarks
This method has no effect if recording is not in progress.
Platform Availability
- Android
- iOS