Integrating peripheral devices
Most of the store operations involve scanning of bar codes for products, location, and so on. The application might interacts with payment devices, responds to notifications, and so on. It is necessary that the application responds to events from external devices or services, such as bar code scanners.
Applications that are native to a mobile device can communicate directly with peripheral devices. However, hybrid applications make it possible to embed standard web applications in a mobile native container so that they can communicate with external devices. Therefore, you can embed Sterling Store Engagement in a native wrapper application by using the hybrid technology.
To support integration with peripheral devices, the following components are provided by default:
- CordovaInitialiserComponent
- The
CordovaInitialiserComponentloads Cordova scripts and also registers the plug-in initialization code with the Sterling Store Engagement application.
- BarcodeScannerDirective directive
- The
BarcodeScannerDirectiveis used as an attribute to the input field for listening to bar code scanner events.
- CordovaService service
- The
CordovaServiceprovides theregisterPluginInitializationutility method to register the plug-in initialization code.