Book Image

JavaScript Mobile Application Development

Book Image

JavaScript Mobile Application Development

Overview of this book

Table of Contents (15 chapters)
JavaScript Mobile Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Developing Sound Recorder application


After generating the initial application code, it's time to understand what to do next.

Sound Recorder functionality

The following screenshot shows our Sound Recorder page:

When the user clicks on the Record Sound button, they will be able to record their voices; they can stop recording their voices by clicking on the Stop Recording button. You can see this in the following screenshot:

As shown in the following screenshot, when the user clicks on the Playback button, the recorded voice will be played back:

Sound Recorder preparation

In order to implement this functionality using Apache Cordova, we need to add the following plugins using the indicated commands, which should be executed from the application directory:

  • media: This plugin is used to record and play back sound files:

       > cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-media.git
    
  • device: This plugin is required to access the device information:

       > cordova plugin...