Cordova Plug-Ins (for Accessing Native Device Capabilities)

Recall the Cordova plug-in layer from Figure 25.1. This layer represents native plug-ins you can use in your application that serve as a bridge between the native web view and the actual device features (such as the camera, audio, geo-location, and even the app status bar).

There are nearly 1,000 plug-ins available from the Apache Cordova Plugins Registry (plugins.cordova.io). It can be hard to sort through that many options. Thankfully, Microsoft has vetted a number of great Cordova plug-ins and has made them available right from within Visual Studio. These are plug-ins Microsoft has tested for compatibility and use.

You add a plug-in to your application from the config.xml designer. You access this designer simply by double-clicking the app’s config.xml file inside Solution Explorer. Figure 25.14 shows an example. Notice the many plug-ins available under the Core heading. Currently there are 25 listed here (out of nearly 1,000 possible).

Image

FIGURE 25.14 The config.xml designer provides access to installing the Cordova plug-ins to your application.

You click the Add button to add the plug-in to your open application. We will look at doing so in the next section.


Tip

You can find more information (and documentation) about each plug-in from the Cordova Plugins Registry at plugins.cordova.io.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset