Did You Know: Searching for PhoneGap/Cordova Plugins

This post is more than 2 years old.

I discovered this yesterday which means it has probably been around forever and I'm the last one to get a clue. As you should (hopefully) know by now, PhoneGap 3.0 majorly changed how you use core features. (I discussed these changes in detail here: PhoneGap 3 Released - Things You Should Know.) The biggest change that will trip developers over (and yes, it still trips me up) is the requirement to add plugins for core features like geolocation, camera support, etc.

Luckily it takes all of two seconds to do this. The issue I run into myself is that I can never remember the names of the plugins. They all have fairly simple names, like org.apache.cordova.camera for camera. But then you run into things like this: org.apache.cordova.device-motion. What feature is that? The accelerometer. Makes sense - but I would have guessed org.apache.cordova.accelerometer.

What I normally do is just pop open a tab to docs.cordova.io, find my feature, and copy out the name. The docs put the plugin name right up there at the top so it is easy to find. As simple as that is, I just yesterday discovered that the Cordova CLI supports searching for plugins. For example:

This searches the entire set of plugins at Cordova Plugins so it includes more than just the "core" set. If you want to list all the core plugins, you can try searching for org.apache.cordova, but this includes a few additional ones as well.

Unfortunately this isn't perfect. Using my accelerometer example above it won't actually find a match if you try searching for "accel". I'm going to ask around to see if there is a way to flesh out the descriptions for plugins so that searches could be a bit more useful.

p.s. I should point out that there is another PhoneGap plugin registry as well - but I'll cover that later today.

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Archived Comments

Comment 1 by Adam Harris posted on 1/4/2014 at 9:34 AM

That's cool! I wonder how you can get your plugin listed on in that registry?

Comment 2 by Raymond Camden posted on 1/4/2014 at 7:29 PM

Yeah good question. It isn't described on the page.

Comment 3 by Cesidio DiBenedetto posted on 1/4/2014 at 9:53 PM


I wrote an npm cli package that does the same thing but also searches http://plugreg.com. Take a look and tell me what you think.



Comment 4 by Raymond Camden posted on 1/4/2014 at 10:21 PM

@Cesidio: I plan to - was going to cover it in my follow up. (See the PS.)

Comment 5 by Cesidio DiBenedetto posted on 1/4/2014 at 10:26 PM


Apologies. Didn't notice the p.s.

Keep up your awesome work.


Comment 6 by Raymond Camden posted on 1/4/2014 at 10:36 PM

Heh, no worries. As it stands, folks may miss the next post (and it will take a few days, I've got a trip).