The Cordova Media Capture plugin provides the ability to capture Audio, Image and Video. The Kapsel Voice Recording plugin provides the ability to record audio in an encrypted format and provides a SAPUI5 user interface to record and play back the audio.
Note that the API exposed by this plugin changed in SP10. If you are using SP09 or SP08, see Voice Recording Plugin (New in SP08).
For additional details see C:\SAP\MobileSDK3\KapselSDK\docs\api\sap.VoiceRecording.html or the Documentation at Using the Voice Recording Plugin.
The following steps will demonstrate this plugin.
cordova create C:\Kapsel_Projects\VoiceRecordingDemo com.mycompany.voicerecording VoiceRecordingDemo
cd C:\Kapsel_Projects\VoiceRecordingDemo
cordova platform add android
cordova plugin add kapsel-plugin-voicerecording --searchpath %KAPSEL_HOME%/plugins
cordova create ~/Documents/Kapsel_Projects/VoiceRecordingDemo com.mycompany.voicerecording VoiceRecordingDemo
cd ~/Documents/Kapsel_Projects/VoiceRecordingDemo
cordova platform add ios
cordova plugin add kapsel-plugin-voicerecording --searchpath $KAPSEL_HOME/plugins
cordova run android
or
cordova run ios
Note, the Android emulator or iOS simulator can be used for this sample.//around line 722 in recording.js
if (state.secureStoreOpen) {
store = utils.getEncryptedStorage(); //add this line to prevent Can't find variable store errors after calling the recording.getAsFile method.
store.decryptFile(
On 7 inch Android devices or emulators, you may wish to tweak the code to prevent the orientation from changing when displaying the recording or playback screen. This may be fixed already in a more recent SAPUI5 release.//around line 230 in screen.js
beforeOpen: function() {
//if (window.screen.hisap.ui.Device.system.phone) screen.lockOrientation("portrait");
if ((window.screen.height < 600) || (window.screen.width < 600)) screen.lockOrientation("portrait");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
26 | |
25 | |
21 | |
12 | |
9 | |
8 | |
8 | |
8 | |
8 | |
8 |