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

@fttx/cordova-plugin-intent

v3.0.2

Published

General purpose intent shim layer for cordova applications on Android. Handles various techniques for sending and receiving intents. Supports Android 14+ broadcast receiver requirements. Android 14+ compatible fork.

Downloads

43

Readme

Cordova Intent Plugin

npm version npm downloads npm licence

General purpose shim layer for the Android intent mechanism, exposing various ways to handle sending and receiving intents. Fully compatible with Android 14+.

Installation

cordova plugin add @fttx/cordova-plugin-intent

Android 14+ Configuration

If your app receives broadcasts from external apps (like Zebra DataWedge, barcode scanners), add this to your config.xml:

<platform name="android">
    <config-file target="AndroidManifest.xml" parent="/manifest/application">
        <receiver android:name="com.darryncampbell.cordova.plugin.intent.BarcodeReceiver"
                  android:exported="true">
            <intent-filter>
                <action android:name="com.symbol.datawedge.api.RESULT_ACTION" />
            </intent-filter>
        </receiver>
    </config-file>
</platform>

Why? Android 14+ requires static receivers for explicit broadcasts. Add all broadcast actions your app needs to receive.

Common actions:

  • Zebra DataWedge: com.symbol.datawedge.api.RESULT_ACTION
  • Generic scanners: com.scanner.broadcast

Verification:

cordova build android
grep "BarcodeReceiver" platforms/android/app/src/main/AndroidManifest.xml

Usage Example

document.addEventListener("deviceready", function () {
  // Register for DataWedge broadcasts
  window.plugins.intentShim.registerBroadcastReceiver(
    {
      filterActions: ["com.symbol.datawedge.api.RESULT_ACTION"],
    },
    function (intent) {
      var barcode = intent.extras["com.symbol.datawedge.data_string"];
      console.log("Scanned:", barcode);
    }
  );
});

API Reference

Register Broadcast Receiver

window.plugins.intentShim.registerBroadcastReceiver(
  {
    filterActions: ["com.symbol.datawedge.api.RESULT_ACTION"],
  },
  function (intent) {
    console.log("Received:", JSON.stringify(intent.extras));
  }
);

Unregister Broadcast Receiver

window.plugins.intentShim.unregisterBroadcastReceiver();

Send Broadcast

window.plugins.intentShim.sendBroadcast(
  {
    action: "com.yourapp.ACTION",
    extras: { key: "value" },
  },
  successCallback,
  failureCallback
);

On Intent (Listen for Launch Intent)

window.plugins.intentShim.onIntent(function (intent) {
  console.log("Intent:", JSON.stringify(intent.extras));
});

Start Activity

window.plugins.intentShim.startActivity(
  {
    action: window.plugins.intentShim.ACTION_VIEW,
    url: "geo:0,0?q=London",
  },
  successCallback,
  failureCallback
);

Get Intent

window.plugins.intentShim.getIntent(function (intent) {
  console.log("Action:", intent.action);
}, failureCallback);

Start Activity for Result

window.plugins.intentShim.startActivityForResult(
  {
    action: window.plugins.intentShim.ACTION_PICK,
    url: "content://com.android.contacts/contacts",
    requestCode: 1,
  },
  function (intent) {
    console.log("Result:", intent.data);
  },
  failureCallback
);

Send Result

window.plugins.intentShim.sendResult(
  {
    extras: { result: "value" },
  },
  callback
);

Package Exists

window.plugins.intentShim.packageExists(
  "com.android.contacts",
  function (exists) {
    console.log("Installed:", exists);
  }
);

Constants

window.plugins.intentShim.ACTION_VIEW;
window.plugins.intentShim.ACTION_SEND;
window.plugins.intentShim.ACTION_CALL;
window.plugins.intentShim.ACTION_SENDTO;
window.plugins.intentShim.ACTION_GET_CONTENT;
window.plugins.intentShim.ACTION_PICK;
window.plugins.intentShim.EXTRA_TEXT;
window.plugins.intentShim.EXTRA_SUBJECT;
window.plugins.intentShim.EXTRA_STREAM;
window.plugins.intentShim.EXTRA_EMAIL;

Resources

Credits

Fork of com-darryncampbell-cordova-plugin-intent by Darryn Campbell. Android 14+ compatibility by @fttx. MIT License.