So far we’ve talked a lot about the tools and plugins that are part of the Cordova framework, but what if you want to do something within a Cordova application which isn’t exposed through one of the existing plugins? Well, you have to go it alone and build your own plugins. In this chapter, I’ll you how to create your own plugins for Apache Cordova.

Cordova plugins are not new, they’ve been around for a while, but with the release of Cordova 3.0 and the capabilities provided by plugman and the Cordova CLI, plugins have changed a bit. In this chapter, I’ll show you how to create three plugins, one which is a JavaScript-only plugin plus another plugin which I will show you how to create for both Android and iOS. The process is essentially the same for other mobile platforms, so you will need to refer to the documentation for coverage of other platforms such as BlackBerry 10 and Windows 8.