The following forum(s) are migrating to a new home on Microsoft Q&A (Preview): Developing Universal Windows apps!

Ask new questions on Microsoft Q&A (Preview).
Interact with existing posts until December 13, 2019, after which content will be closed to all new and existing posts.

Learn More

 none
[UWP]Windows.Devices.Scanner in WUP? RRS feed

  • Question

  • Hello Everyone,

    I wanted to release a WUP version of my app that access image scanners devices using the Windows.Devices.Scanner API of Windows 8.1

    Those seems not to be supported under WUP. Are there any plans to port them?
    If not or in the meantime how can I provide the best possible for Windows 10 from my Windows 8.1 project?

    I really do not want to "let my users" down...

    Many thanks in advance for your help,

    Best regards,

    Bruno

    Thursday, August 6, 2015 9:40 AM

Answers

  • Hi Bruno,

    >>Those seems not to be supported under WUP. Are there any plans to port them?

    The Windows.Devices.Scanners API is supported in Windows 10 device family, but only Desktop device. For example, see ImageScanner class: https://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.scanners.imagescanner.aspx

    Also this API has been mentioned in this guideline: https://msdn.microsoft.com/en-us/library/Dn894631.aspx

    The set of APIs within a device family is further broken down into subdivisions known as API contracts. You can use the ApiInformation.IsApiContractPresent method to test for the presence of an API contract. This is useful if you want to test for the presence of a large number of APIs that all exist in the same version of an API contract.

    bool isWindows_Devices_Scanners_ScannerDeviceContract_1_0Present =
            Windows.Foundation.Metadata.ApiInformation.IsApiContractPresent
                ("Windows.Devices.Scanners.ScannerDeviceContract", 1, 0);


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, August 7, 2015 5:16 AM
    Moderator

All replies

  • Hi Bruno,

    >>Those seems not to be supported under WUP. Are there any plans to port them?

    The Windows.Devices.Scanners API is supported in Windows 10 device family, but only Desktop device. For example, see ImageScanner class: https://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.scanners.imagescanner.aspx

    Also this API has been mentioned in this guideline: https://msdn.microsoft.com/en-us/library/Dn894631.aspx

    The set of APIs within a device family is further broken down into subdivisions known as API contracts. You can use the ApiInformation.IsApiContractPresent method to test for the presence of an API contract. This is useful if you want to test for the presence of a large number of APIs that all exist in the same version of an API contract.

    bool isWindows_Devices_Scanners_ScannerDeviceContract_1_0Present =
            Windows.Foundation.Metadata.ApiInformation.IsApiContractPresent
                ("Windows.Devices.Scanners.ScannerDeviceContract", 1, 0);


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, August 7, 2015 5:16 AM
    Moderator
  • Hello,

    Thanks a lot for the answer and the information. It worked very well.

    Regards,

    Bruno

    Sunday, August 23, 2015 7:55 AM
  • And in case you don't know what to do to reference Windows.Desktop

    1. Reference the Extension for Desktop Applications

    2. Modify the Package.appxmanifest

    Targeting Windows 10 Desktop Device Family 

    http://pmichaels.net/2015/11/06/targeting-windows-10-desktop-device-family/ 


    MVP Program: http://www.microsoft.com/mvp

    • Proposed as answer by Sandi Zeher Thursday, July 20, 2017 8:05 PM
    Saturday, April 22, 2017 2:47 PM
  • Thank you very much for this solution! Cheers!
    • Edited by Sandi Zeher Thursday, July 20, 2017 8:05 PM
    Thursday, July 20, 2017 8:05 PM