[英]Universal Windows Platform (UWP) barcode scanner application
I want to create a simpe UWP barcode scanner application but I am unable to use my built in camera on my Lumia 950 or on my laptop, because PointOfService(POS) API seems to be working only with an external barcode scanner that is connected through USB port. 我想创建一个simpe UWP条形码扫描仪应用程序,但是我无法在Lumia 950或笔记本电脑上使用内置摄像头,因为PointOfService(POS)API似乎只能与通过USB连接的外部条形码扫描仪一起使用港口。 I managed to successfully implement Windows Hello to my application, but to create a barcode scanner looks almost impossible, because there is no proper tutorial on the web.
我设法成功地对我的应用程序实现Windows Hello,但是创建条形码扫描器似乎几乎是不可能的,因为网上没有适当的教程。 Can you please give me some advice, what API should I use?
您能否给我一些建议,我应该使用哪种API? Because it looks that POS API will not work for me if I want to scan a barcode with built in camera on my devices.
因为如果我想使用设备上的内置摄像头扫描条形码,看来POS API对我不起作用。
I use BarcodeScanner class for detecion of the barcode scanner on my device. 我使用BarcodeScanner类来检测设备上的条形码扫描仪。 Here is a part of my code where I want to detect a barcode scanner:
这是我要检测条形码扫描仪的代码的一部分:
BarcodeScanner scanner = await BarcodeScanner.GetDefaultAsync();
But i just get message, that no barcode scanner was detected, even if I add pointOfService to 但是我只收到一条消息,即使我将pointOfService添加到
<Capabilities>
<DeviceCapabilities Name="pointOfService" />
</Capabilities>
Anyone some suggestions how to solve this issue? 有人建议如何解决这个问题? I searched through the forums but only solution that I found was ZXing API, but I would rather use native Microsoft API than 3rd party solutions, if it is possible.
我在论坛上进行了搜索,但是找到的唯一解决方案是ZXing API,但如果可能的话,我宁愿使用本机Microsoft API而不是第三方解决方案。 I use Visual Studio 2015.
我使用Visual Studio 2015。
Ok, it was pretty easy to implement ZXing API, now I get it working as it is supposed to work. 好的,实现ZXing API非常容易,现在我可以按预期工作了。 There is very nice example how to implement barcode scanner with ZXing API, it is really worth of try.
有一个非常好的示例,说明如何使用ZXing API实现条形码扫描仪,这确实值得一试。
https://zxingnet.codeplex.com/SourceControl/latest#trunk/Clients/WindowsRTDemo/Package.appxmanifest https://zxingnet.codeplex.com/SourceControl/latest#trunk/Clients/WindowsRTDemo/Package.appxmanifest
So problem solved :) 所以问题解决了:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.