@ticnat/nativescript-socketmobile
NativeScript plugin for integrating SocketMobile scanners
npm i --save @ticnat/nativescript-socketmobile
- Version: 1.0.2
- GitHub: https://github.com/OPADA-Eng/ticnat-ns-plugins
- NPM: https://www.npmjs.com/package/%40ticnat%2Fnativescript-socketmobile
- Downloads:
- Last Day: 0
- Last Week: 0
- Last Month: 0
@ticnat/nativescript-socketmobile
ns plugin add @ticnat/nativescript-socketmobile
Usage
- create a new instance of the scanner plugin:
const socket = new Socketmobile(AppKey,DeveloperID, AppID);
and pass you appkey developerId and appId obtained from Socket Mobile Developer Portal
- initialize the scanner with the callbacks:
socket.didReceiveDecodedData = (data: string, device, result) => {
console.log('scannedText', data);
}
socket.initScanner();
-
Connect and pair your sockermobile scanner with the iPad through socket mobile companion app
-
add these to info.plist file
<key>UISupportedExternalAccessoryProtocols</key>
<array>
<string>com.socketmobile.chs</string>
</array>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>Using bluetooth to connect the app to the barcode scanner</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>Using bluetooth to connect the app to the barcode scanner</string>
- All done!
Notice:
-
This plugin tested on Socket mobile S740 model but I think it works with other models.
-
The plugin is under development, if you have any improvements Welcome to PRs!
License
Apache License Version 2.0