npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cordova-plugin-callrecorder

v1.0.0

Published

Automatic call recording for Android (API 24+). Records regular calls AND VoIP calls (WhatsApp, Signal, Telegram, Zoom). Works on Android 9–14. Uses AccessibilityService so no root required.

Readme

cordova-plugin-callrecorder

⚠️ RESTRICTED USE — APPROVAL REQUIRED

You are NOT allowed to use this plugin until you have received written approval via email from MGTECH LABS PRIVATE LIMITED.

To request approval, contact us at: [email protected]

Website: www.kalamacademy.org


Automatic call recording for Android apps built with Cordova or VoltBuilder.

Records both regular phone calls and VoIP calls (WhatsApp, Signal, Telegram, Zoom, Google Meet, Skype, Discord) — without root, without a system app.


What it supports

| Feature | Status | |---|---| | Regular phone calls | ✅ | | WhatsApp voice calls | ✅ | | Signal, Telegram calls | ✅ | | Zoom, Google Meet, Skype | ✅ | | Keep recording when screen is locked | ✅ | | Survive phone reboot | ✅ | | Android 9 to 14 (API 24–35) | ✅ | | No root required | ✅ |


How it works (simple explanation)

Normally Android blocks apps from recording calls. This plugin gets around that using two tricks:

  1. AccessibilityService — Android's built-in tool for apps that need to "see" the screen (used by screen readers). We use it to detect when a call screen opens, then start recording.
  2. PhoneStateListener — Listens for when a call connects/disconnects to start and stop recording automatically.

The user has to manually enable Accessibility permission once (just like enabling a screen reader). After that, everything is automatic.


Quick install (3 steps)

Step 1 — Add the plugin

From NPM (once published):

cordova plugin add cordova-plugin-callrecorder

From local folder (for testing):

cordova plugin add ./path/to/cordova-plugin-callrecorder

Step 2 — Add this to your config.xml

<preference name="android-targetSdkVersion" value="35" />
<preference name="android-minSdkVersion" value="24" />
<preference name="AndroidXEnabled" value="true" />

Step 3 — Call these 3 functions in your app on first launch

// Step 1: Ask for microphone + phone state permissions
CallRecorder.requestPermissions(
  function() { console.log('Permissions granted'); },
  function(err) { console.error('Permission denied:', err); }
);

// Step 2: Check if accessibility is on, if not, open settings
CallRecorder.isAccessibilityEnabled(
  function(enabled) {
    if (!enabled) {
      // This opens Android Settings so the user can turn it on
      CallRecorder.openAccessibilitySettings();
    }
  }
);

// Step 3 (optional but recommended): Protect app from uninstall
CallRecorder.activateDeviceAdmin(
  function() { console.log('App protected from uninstall'); },
  function(err) { console.warn('Device admin skipped:', err); }
);

That's it. After these 3 steps, call recording starts automatically. You don't need to do anything else per-call.


Full JavaScript API

All methods use callbacks: success(result) and error(message).

// ── Setup ──────────────────────────────────────────────────────────────────

// Request RECORD_AUDIO + READ_PHONE_STATE permissions
CallRecorder.requestPermissions(success, error);

// Returns 1 (enabled) or 0 (disabled)
CallRecorder.isAccessibilityEnabled(success, error);

// Opens Android Accessibility Settings page
CallRecorder.openAccessibilitySettings(success, error);

// Opens Device Admin activation dialog (prevents uninstall)
CallRecorder.activateDeviceAdmin(success, error);

// Returns 1 (active) or 0 (not active)
CallRecorder.isDeviceAdminActive(success, error);

// Returns 1 (granted) or 0 (denied)
CallRecorder.hasRecordPermission(success, error);


// ── Recordings ─────────────────────────────────────────────────────────────

// Returns array of recording objects: [{name, path, size, date}, ...]
CallRecorder.getRecordings(success, error);

// Delete a recording by its path
CallRecorder.deleteRecording(filePath, success, error);

// Open a recording in the phone's audio player
CallRecorder.playRecording(filePath, success, error);


// ── Info ───────────────────────────────────────────────────────────────────

// Returns {manufacturer, model, sdkInt, androidVersion}
CallRecorder.getDeviceInfo(success, error);

Integrating into an existing CRM app

If you already have a Cordova CRM app that needs call recording, here is exactly what to add:

1. Add the plugin

cd your-crm-app
cordova plugin add cordova-plugin-callrecorder

2. In your app's config.xml, make sure these exist:

<preference name="android-minSdkVersion" value="24" />
<preference name="android-targetSdkVersion" value="35" />
<preference name="AndroidXEnabled" value="true" />

3. In your main index.html or app startup code, add inside deviceready:

document.addEventListener('deviceready', function () {

  // --- One-time setup check ---
  CallRecorder.hasRecordPermission(function(granted) {
    if (!granted) {
      CallRecorder.requestPermissions(null, null);
    }
  });

  CallRecorder.isAccessibilityEnabled(function(enabled) {
    if (!enabled) {
      alert('Please enable "Call Recorder" in Accessibility Settings to start recording calls.');
      CallRecorder.openAccessibilitySettings();
    }
  });

}, false);

4. To show recordings in your CRM's call history:

CallRecorder.getRecordings(function(result) {
  // result is either an array or a JSON string
  var recordings = Array.isArray(result) ? result : JSON.parse(result);

  recordings.forEach(function(rec) {
    console.log('Recording:', rec.name);
    console.log('Size:', rec.size, 'bytes');
    console.log('Date:', rec.date);
    console.log('Path:', rec.path);
  });
}, function(err) {
  console.error('Could not get recordings:', err);
});

File structure of the plugin

cordova-plugin-callrecorder/
│
├── plugin.xml                          ← Tells Cordova what to install
├── package.json                        ← NPM metadata
├── README.md                           ← This file
│
├── www/
│   └── callrecorder.js                 ← JavaScript API (what you call in your app)
│
└── src/android/                        ← Android Java code (hidden from developer)
    ├── CallRecorderPlugin.java         ← Bridge between JS and Android
    ├── AccessibilityRecorderService.java ← Detects call screens, records audio
    ├── MonitorService.java             ← Heartbeat: keeps recording running
    ├── BootReceiver.java               ← Restarts services after phone reboot
    ├── AppDeviceAdminReceiver.java     ← Prevents accidental uninstall
    └── RecordingFileProvider.java      ← Handles secure file sharing

As a developer using this plugin, you only need to know about callrecorder.js. Everything in src/android/ runs automatically.


Where recordings are saved

Recordings are saved inside the app's private storage:

/data/user/0/YOUR_APP_PACKAGE/files/CallRecordings/Call_YYYYMMDD_HHmmss.m4a

They are not visible in the phone's file manager (this is intentional for privacy).

To access them, use CallRecorder.getRecordings() and CallRecorder.playRecording().


Permissions explained

The plugin adds these Android permissions automatically — you do not need to add them manually:

| Permission | Why needed | |---|---| | RECORD_AUDIO | To record the call audio | | READ_PHONE_STATE | To detect when a call starts/ends | | FOREGROUND_SERVICE | To keep recording running in background | | WAKE_LOCK | To prevent screen turning off mid-call | | RECEIVE_BOOT_COMPLETED | To restart services after phone reboot | | BIND_ACCESSIBILITY_SERVICE | To detect VoIP call screens |


VoIP apps supported

These apps are hard-coded to trigger recording when their call screen opens:

  • WhatsApp and WhatsApp Business
  • Signal
  • Telegram and Telegram X
  • Google Meet
  • Zoom
  • Skype
  • Discord

Troubleshooting

Recording is silent / file is 0 bytes: Make sure RECORD_AUDIO is granted AND Accessibility is enabled.

"tile memory exceeded" warning in logs: Harmless WebView warning. Does not affect recording.

App crashes on first open: This was a known bug (FOREGROUND_SERVICE_MICROPHONE required before permissions granted). Fixed in v1.0.0 by using dataSync type for MonitorService.

Call is not recorded:

  1. Check Accessibility is enabled (green in app UI)
  2. Check microphone permission is granted
  3. Some Android 14 devices restrict VOICE_RECOGNITION audio source — try on a different device

License

Proprietary — All Rights Reserved

This plugin is the intellectual property of MGTECH LABS PRIVATE LIMITED.

© 2026 MGTECH LABS PRIVATE LIMITED. All rights reserved.