Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling SocketCam C820 still calls didNotifyArrivalForDevice #13

Open
chbeer opened this issue Oct 26, 2023 · 12 comments
Open

Disabling SocketCam C820 still calls didNotifyArrivalForDevice #13

chbeer opened this issue Oct 26, 2023 · 12 comments

Comments

@chbeer
Copy link

chbeer commented Oct 26, 2023

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 get E_INVALIDHANDLE, then the SocketCam still reported with didNotifyArrivalForDevice

@cyrille-socket
Copy link
Contributor

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

@yliu342
Copy link

yliu342 commented Dec 12, 2023

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

@yliu342
Copy link

yliu342 commented Dec 12, 2023

When we call the getDevices() the . socketCamC820 is always returned. We will have to manually filter it out..

@cyrille-socket
Copy link
Contributor

cyrille-socket commented Dec 14, 2023

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.

@yliu342
Copy link

yliu342 commented Jan 8, 2024

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.

@cyrille-socket
Copy link
Contributor

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?

@yliu342
Copy link

yliu342 commented Jan 8, 2024

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

@yliu342
Copy link

yliu342 commented Jan 8, 2024

Also since your company moved to the private repo in future how should we get support or open issues such like this?

@cyrille-socket
Copy link
Contributor

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

openWithAppInfo needs to be called in the first place along when you launch your app basically. Then ou can call any set/get property.

@cyrille-socket
Copy link
Contributor

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: [email protected]

@Ceroce
Copy link

Ceroce commented Nov 15, 2024

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.

@cyrille-socket
Copy link
Contributor

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)")
        }
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants