Cordova plugin that allows to record Voice calls, This plugin supports only Android
Until Android 9, Android provides API to capture the Voice calls (MediaRecorder.AudioSource.VOICE_CALL
)
From Android 10 & 11, Capturing voice call are restricted, So we will register our app as Accessibility voice provider (MediaRecorder.AudioSource.VOICE_RECOGNITION
) and we’ll record the calls.
In Android 10, In some devices we will not be able to record the caller’s voice
- If Device has active inbuilt call recording feature, In this case the built-in app will have privileged(
permission.CAPTURE_AUDIO_HOTWORD
) permissions so our will not be able to capture the voice calls. - If the manufacturer had used
setPrivacySensitive()
istrue
in audio sources, Then only our voice will be recorded and opponents voice will not be recorded. (Devices like Realme pro 3 pro, Realme 7)
var success = function(message) {
alert("Recording Enabled");
}
var failure = function() {
alert("Error calling Plugin");
}
cordova.plugins.callrecord.startRecordingService(success, failure);
var success = function() {
alert("Accessibility Opened");
}
var failure = function() {
alert("Error calling Plugin");
}
cordova.plugins.callrecord.openAccessibility(success, failure);
var success = function() {
alert("AppSetting Opened");
}
var failure = function() {
alert("Error calling Plugin");
}
cordova.plugins.callrecord.openAppSetting(success, failure);
var success = function() {
alert("Excluded Power Saver");
}
var failure = function() {
alert("Error calling Plugin");
}
cordova.plugins.callrecord.excludePowerSaver(success, failure);
var success = function(flag) { //boolean flag
alert("Excluded Power Saver status" + flag);
}
var failure = function() {
alert("Error calling Plugin");
}
cordova.plugins.callrecord.IsIgnoringBatteryOptimizations(success, failure);
Recording service will be running independent of the application, This event is in application layer hence event will not be triggered if
-
App was not launched since the mobile booted
-
App was killed forcefully
document.addEventListener('fileAvailable', function() { //File Operations });
Apache License - 2.0