{"id":25932711,"url":"https://github.com/socketmobile/capturesingleentry-uwp","last_synced_at":"2025-09-18T00:52:35.952Z","repository":{"id":115907470,"uuid":"362449696","full_name":"SocketMobile/capturesingleentry-uwp","owner":"SocketMobile","description":"sample code to show how to use Capture for an UWP application","archived":false,"fork":false,"pushed_at":"2021-04-28T11:54:29.000Z","size":158,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-31T02:11:00.727Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SocketMobile.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-04-28T11:53:48.000Z","updated_at":"2021-04-28T11:54:32.000Z","dependencies_parsed_at":"2023-12-06T12:00:17.785Z","dependency_job_id":null,"html_url":"https://github.com/SocketMobile/capturesingleentry-uwp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SocketMobile/capturesingleentry-uwp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocketMobile%2Fcapturesingleentry-uwp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocketMobile%2Fcapturesingleentry-uwp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocketMobile%2Fcapturesingleentry-uwp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocketMobile%2Fcapturesingleentry-uwp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SocketMobile","download_url":"https://codeload.github.com/SocketMobile/capturesingleentry-uwp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocketMobile%2Fcapturesingleentry-uwp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275691192,"owners_count":25510500,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-17T02:00:09.119Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-04T00:38:54.420Z","updated_at":"2025-09-18T00:52:35.932Z","avatar_url":"https://github.com/SocketMobile.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Single Entry using Capture SDK\n\n![](screenshot.png)\n\n## Introduction\nThis is a sample application to show how to use the Socket Mobile Capture SDK.\n\nThe Socket Mobile Capture SDK is available as NuGet from NuGet.org.\n\nWhen loading the project in Visual Studio, the Capture NuGet should restore itself from NuGet.org.\n\nThe Socket Mobile Capture relies on a Windows service running on the PC in order to manage the connection to a Socket Mobile scanner.\n\nThis service is called Socket Mobile Companion. If you have installed the Socket Mobile Companion package, this service comes with an application called Socket Mobile Companion. The version and the status of the service can be checked through Socket Mobile Companion.\n\nSocket Mobile Companion app is also required when connecting a scanner for the first time as it will configure the scanner during the first connection process.\n\nExiting the Socket Mobile Companion app won't terminate the Socket Mobile Companion service. If a scanner is already configured to connect to the PC, Socket Mobile Companion UI is no longer required but can be used to show the scanner connection status, and to configure a new scanner.\n\n## Using Capture SDK\nThe scanner connection and disconnection process is independent of the application. The application receives a device arrival notification when a Socket Mobile scanner is connected to the host, and a device removal when it disconnects.\n\nThe best way to use the Capture API is to use the Capture Helper class, found in CaptureHelper.cs.\n\nCapture Helper provides most of the APIs Capture offers, and hides most the complexity of handling the scanner.\n\nCapture Helper asynchronous event handlers should be set up before opening Capture Helper.\n\nHere is an example from the source of this sample application:\n```\nmCapture.DeviceArrival += mCapture_DeviceArrival;\nmCapture.DeviceRemoval += mCapture_DeviceRemoval;\nmCapture.DecodedData += mCapture_DecodedData;\n```\n\nIf the application UI needs to be updated from these handlers, or in the callbacks of the Capture Helper API methods, a context can be set once also before opening Capture Helper as follow:\n`capture.ContextForEvents = WindowsFormsSynchronizationContext.Current;`\n\nThe sample app uses a timer to open Capture. This is to handle the case where Socket Mobile Companion service is not running when the application is trying to use it. If the Capture service is not running when the sample starts, you can start it and retry by restarting the timer. \n\nThe scanner decoded data are received by the application by subscribing to the Capture Helper event: `DecodedData`.\n\n## Opening Capture - Application Registration\nOpening Capture requires some application information, such as the application ID, a developer ID and the application AppKey.\nTo set these up go to the Socket Mobile developer portal register and for an account. \n\n## Documentation\nFor more information please consult the Capture SDK documentation at: https://docs.socketmobile.com/capture/csharp/en/latest/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocketmobile%2Fcapturesingleentry-uwp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsocketmobile%2Fcapturesingleentry-uwp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocketmobile%2Fcapturesingleentry-uwp/lists"}