Search code examples
c#botframeworkcortanacortana-skills-kit

Get user device information for Cortana Skill


I am developing a Cortana skill using botframework in C#. This skill needs to know which device is talking to it. I'm wondering if there is any way to get device information(such as device name, Serial number, etc) for bot because I wont to see my bot be used on the device that is made by the competitor. For example: assume user_1 have two laptops(A made by DOll, B made by HPp), my bot wants to know if user_1 is using A to interact with it. Is it possible?


Solution

  • There is not currently away to get this level of detail about the devices being used.

    Currently, Cortana supports letting developers know whether or not the screen has a display.

    https://learn.microsoft.com/en-us/cortana/skills/cortana-device-type

    Each message contains an entities field, which is an array of objects. One of the objects is a DeviceInfo object with the following properties:

    Name
    Type
    Description

    supportsDisplay Boolean Indicates whether the device has a screen. If true, the device has a screen; otherwise, false. If the user is using a headless device such as a standalone speaker, this value would be false. Otherwise it would be true. type string The object's type, which is set to DeviceInfo. The following shows an example of the DeviceInfo object.

    JSON

    {                          
        "type": "DeviceInfo",       
        "supportsDisplay": Boolean                              
    }