none
[UWP]ClaimedBarcodeScanner call to StartSoftwareTriggerAsync throws an exception all of sudden RRS feed

  • Question

  • Have been working on a UWP barcode scanning app using the standard BarcodeScanner sample. Doing dev on a Win10 desktop, all works well using the webcam. Preview works and barcode detection is amazingly fast and accurate. Then started testing on a Lumia 640 with Win 10 Anniversary Edition. It worked for a few days, although the preview does not work. Trying to start the preview says it fails with "not enough resources" in the on error event. Whatever - it is still so quick and accurate that it can be used even without the camera preview.  Point the phone anywhere close read a good code.  Was working on some UI aspects and all of a sudden getting exceptions on the call toe StartSoftwareAsync call. It throws and exception with: "A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)".  Have checked everything many times, restarted the phone, uninstalled the app, clean the project, rebuild all - same thing every time.  Maybe a recent phone update?  Any other ideas of things that might cause this error at that point?  Some log or way to get more information about what in particular is unhappy?
    Wednesday, April 5, 2017 8:32 PM

All replies

  • Hi Shecky Boy,

    Welcome to the Developing Universal Windows apps forum! Please utilize tagging when posting to this forum, thanks!

    We are trying to test your issue now, it may be some time delay. Appreciate your patience. 

    Best regards,

    Breeze


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, April 7, 2017 5:20 AM
    Moderator
  • Hi Shecky Boy,

    The BarcodeScanner class supports both mobile and desktop, but does not support the camera lens as a source on Windows Mobile.  If you have a physical barcode scanner integrated into the chassis or a USB barcode scanner plugged into a USB host port it will work fine.

    For now, if your desire is to use a camera lens for reading barcodes on Windows Mobile, we would recommend using a 3rd party decoder that is integrated into the AppX.

    Best regards,

    Breeze


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, April 7, 2017 8:57 AM
    Moderator
  • Thanks for your reply and that is sad.  However, as noted in my first response, it most certainly did work for some time, and worked well (apart from no preview).  Then it just stopped working, maybe some update?  It is sad because it did work so well and so simply.  And now the I have to go with a much more complex and less functional 3rd party approach like zxing?
    Wednesday, April 26, 2017 8:40 PM
  • @Sheckyboy,

    The reason this barcode decoding does not work on Windows Mobile is due to a dependency on a feature called FrameServer which is capable of splitting the camera feed to multiple consumers.  In the case of the barcode decoding one feed would be sent to the decoder and another to the preview.  FrameServer has been disabled on many Windows Mobile devices due to performance issues when using the camera for traditional purposes on many of the current mobile chipsets.

    We are currently working on an alternative implementation to be included in a future release of Windows 10 that will be equally simple to take advantage of the camera for decoding barcodes using the current BarcodeScanner APIs.  In the meantime, you may want to try using a Bluetooth barcode scanner from our compatibility list with your Lumia device.

    Terry Warwick
    Microsoft


    Thursday, April 27, 2017 2:03 PM
  • Ok, that makes sense.  Especially why I could either preview or scan, but not both (before it was altogether disabled).  As long as I was ok with no preview though, the scanner was working great before msft disabled it.  On the Lumia 640, during testing, I had a few barcodes laying on the desk.  As I moved the camera to the desired barcode, if one of the others even crossed the frame while quickly moving the phone - it would correctly detect the code I accidentally got too close to.  Almost a nusciance it was so quick and accurate.  So it certainly seemed to be able to handle that - and many times better than my previous zxing experience.  I'm sure you all had your reasons, but as usual, there always seems to be something that makes developing apps for mobile a challenge.  The opposite of what you need.  Guess I need to look at hacking the zxing stuff back in and dealing with it's much lesser performance.  Unless you happen to think the scanning will come back anytime soon?  :-)
    Thursday, April 27, 2017 7:17 PM
  • @SheckyBoy,

    Soon is a relative term as it depends on what soon means to you.  I hope to have this capability re-enabled in a public release within 12 months and available to Windows Insiders even sooner, but I cannot provide a specific date at this time.

    I would encourage you to file your request on our User Voice forum where we collect developer feature requests. 
    http://aka.ms/pointofservice.uservoice  We will reply to the feature requests there once we have additional information to share about the feature.

    Terry Warwick
    Microsoft

    Thursday, April 27, 2017 8:23 PM
  • Reading barcodes through a standard camera lens in Windows was re-introduced with Windows 10 version 1703. Please see https://aka.ms/camerabarcode for more information.

    Terry Warwick, Microsoft

    Monday, July 15, 2019 1:55 PM