@ticnat/nativescript-socketmobile
v1.0.2
Published
NativeScript plugin for integrating SocketMobile scanners
Downloads
2
Maintainers
Readme
@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