How to: Use a Custom Plugin in a Mobile Application
- 2 min to read
Cordova provides you with a variety of plugins that can be used to extend your XAF Mobile application's functionality. This topic describes how to add them to your application, and contains examples of using some popular Cordova plugins.
Each third-party plugin needs to be registered in the Mobile application's PhoneGap configuration file. To do this, add a string with the plugin tag to the MobileApplication.AdditionalPhoneGapPlugins collection in the MobileApplication constructor.
For the advanced PhoneGap configuration file customization, use the MobileApplication.CustomizePhoneGapConfig event.
This section contains several examples demonstrating how to integrate some popular Cordova plugins.
Creates an Action to scan a barcode and saves the scanned value to a current object property.
Plugin: Cordova Barcode Scanner.
Example: How to use a Barcode Scanner in XAF Mobile KB article.
Implements multi-platform personalized push notifications sending.
Plugin: PhoneGap Push.
Additional tool: Azure Notification Hubs.
Tracks XAF Mobile application user movements and displays the user's route on the map.
Example: How to use a Background Geolocation in XAF Mobile KB article.
Saves a manually drawn signature to an object's image property.
Plugin: Signature Pad.
Example: How to use a Signature Pad in XAF Mobile KB article.