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-kecleon

v0.1.0

Published

Prevent and detect screenshots and screen recording in Cordova Android apps.

Readme

cordova-plugin-kecleon

Like Kecleon, your app turns invisible when someone tries to capture it.

Prevent and detect screenshots and screen recording in Cordova Android apps.

  • Android 9 – 17 (minSdk 28, compiles against API 35 or later), written in Kotlin
  • Requires cordova-android >= 14 (OutSystems MABS 12 or later)

Install

cordova plugin add [email protected]

OutSystems 11 (MABS 12+)

In the wrapper module's Extensibility Configurations, reference the npm package and pin an exact version, so every build of every app gets the same plugin:

{
    "plugin": {
        "identifier": "[email protected]"
    }
}

To upgrade, change the version, republish the wrapper, then republish the apps that use it.

The plugin turns on Kotlin for the Android build (GradlePluginKotlinEnabled) and adds the DETECT_SCREEN_CAPTURE and DETECT_SCREEN_RECORDING permissions. Both are normal install-time permissions, so users never see a prompt.

Usage

document.addEventListener('deviceready', async () => {
    await Kecleon.enable();

    const stop = Kecleon.on('screenshot', () => showToast('Screenshot detected'));
    Kecleon.on('captureChange', ({ captured }) => setRecordingBanner(captured));

    // A recording that started before you subscribed raises no event, so check once.
    setRecordingBanner(await Kecleon.isCaptured());
});

// When leaving the sensitive screen:
await Kecleon.disable();

TypeScript types ship in types/index.d.ts.

API

| Method | Resolves | Notes | |---|---|---| | enable() | void | Sets FLAG_SECURE: screenshots and recordings are blocked or come out black, and the recent-apps thumbnail is hidden | | disable() | void | | | isEnabled() | boolean | | | isCaptured() | boolean \| null | Whether the app is visible in an active recording. null below Android 15 | | getCapabilities() | { canDetectScreenshot, canDetectRecording } | What this device supports | | on(event, cb) | returns unsubscribe() | Events: screenshot, captureChange ({ captured }) | | off(event, cb) | | |

Rejected promises carry an Error with a code: NO_ACTIVITY, NATIVE_ERROR or UNKNOWN.

Version support

| | Android 9–13 (API 28–33) | Android 14 (API 34) | Android 15–17 (API 35–37) | |---|---|---|---| | Block screenshots & recording | ✅ | ✅ | ✅ | | Hide recent-apps thumbnail | ✅ | ✅ | ✅ | | screenshot event | ❌ | ✅ | ✅ | | captureChange event / isCaptured() | ❌ | ❌ | ✅ |

Caveats

  • FLAG_SECURE only protects the main activity window. Dialogs, InAppBrowser and other plugins' windows are separate windows and are not covered.
  • Android 13 and below give no screenshot signal. Watching MediaStore would need media-read permissions and raises Play policy concerns, so this plugin doesn't do it.
  • Events still fire while protection is on. Verified on Android 16: while FLAG_SECURE is set, a screenshot attempt is blocked but still raises screenshot, and a recording comes out black but still raises captureChange. That lets you react to an attempt, for example with a warning.
  • No protection stops someone photographing the screen with another device.

Development

npm install
npm test          # Jest unit tests for the JS layer (spec/)

To run the on-device tests, add tests/ to a test-framework app (or use cordova-paramedic). The ../example app is set up for manual QA.