Open chbeer opened 1 year ago
Hi @chbeer,
ok I'll look into it.
In the meantime you can filter out the SocketCam device that arrives with
if deviceInfo.deviceType == .socketCamC820 { return }
Best, Cyrille
Hi,
Any update on this? We are also facing the same issue. We didn't setup SocketCam and it seems to be automatically added and received with the didNotifyArrivalForDevice
method.
It only happens on the latest 1.8.34
When we call the getDevices()
the . socketCamC820
is always returned. We will have to manually filter it out..
Hi @yliu342
the version 1.8.51 of our Swift Package on our private git repository also fixes this issue of having SocketCam device in your list.
Hi @cyrille-socket
I'm using the latest 1.8.53 there is a new entry you need to add to LSApplicationQueriesSchemes
which is not mentioned anywhere in the doc.
Also the C820 is still showing if there are no other socket scanner is connect. If there is a connected socket scanner then C820 is not showing.
Hi @yliu342
If you're using the 1.8.53, it means that you got the CaptureSDK on our private repository. Indeed, it has been removed from the Readme. It will be reinserted in the next release. Here's the part:
You also need to add the following key to your Info.plist: LSApplicationQueriesSchemes (Queried URL Schemes) with a new item: sktcompanion (in lower case).
So as of the 1.8.53, CaptureSDK enables by default SocketCam so if you don't have a physical scanner, you still can scan a barcode out of the box. So normally if you have a physical scanner connected, you should have it still unless you disabled it.
Can you share the code of your didNotifyArrivalForDevice
please?
Hi @cyrille-socket we don't do anything special in didNotifyArrivalForDevice
basically every time didNotifyArrivalForDevice
get called we make a call to getDevices()
and update a list of connected devices. The C820 is always returned from the the getDevices()
function.
I also tried to set before calling openWithAppInfo
socketAPI.setSocketCamStatus(.disable) { result in
print("\(result)")
}
And the result is always E_INVALIDHANDLE
Also since your company moved to the private repo in future how should we get support or open issues such like this?
Hi @cyrille-socket we don't do anything special in
didNotifyArrivalForDevice
basically every timedidNotifyArrivalForDevice
get called we make a call togetDevices()
and update a list of connected devices. The C820 is always returned from the thegetDevices()
function.I also tried to set before calling
openWithAppInfo
socketAPI.setSocketCamStatus(.disable) { result in print("\(result)") }
And the result is always
E_INVALIDHANDLE
openWithAppInfo
needs to be called in the first place along when you launch your app basically. Then ou can call any set/get property.
Also since your company moved to the private repo in future how should we get support or open issues such like this?
You can write to our developers support email: developers@socketmobile.com
As of version 1.9.74.0, we're still notified of the C820 arriving, even though it was not explicitly enabled.
I had updated the SDK, and I did not understand why my code was always notified that a scanner was arriving, even though it was not turned on. It took me too long to understand that this was not my scanner (S700), but the C820.
Hi @Ceroce , the device arrival of SocketCam C820 is normal as it is enabled by default in our CaptureSDK. If you don't use camera scanning, you can do the following:
if deviceInfo.deviceType == .socketCamC820 || deviceInfo.deviceType == .socketCamC860 {
// do something or don't do something
}
or disable SocketCam with our CaptureHelper
:
let captureHelper = CaptureHelper.sharedInstance
captureHelper.setSocketCamStatus(.disable, withCompletionHandler: { (setResult) in
if setResult == SKTCaptureErrors.E_NOERROR {
print("SocketCam disabled returned \(setResult.rawValue)")
}
})
I disabled the SocketCam C820 as described here: https://docs.socketmobile.com/capture/ios/en/latest/socketCam.html#enabling-socketcam
I just call it with
.disable
, but I getE_INVALIDHANDLE
, then the SocketCam still reported withdidNotifyArrivalForDevice