Posts: 9
Joined: Wed May 06, 2015 7:00 pm

Determine if device belongs to IoT family

Wed May 27, 2015 8:25 pm

i was wondering how to determine if the device belongs to the IoT-family, in my case a raspberry pi 2, but I dont need to know if it espacially a raspberry, just IoT device.

I tried the following code:

Code: Select all

//if(ApiInformation.IsApiContractPresent("DevicesLowLevelContract ", 1))
if (ApiInformation.IsTypePresent("Windows.Devices.Gpio"))
and both wont be true on my notebook, but wont be true as well on my rasbperry pi ... has someone an idea or knows how to do it right?

Thank you for all well meaned and helpful answers!

Posts: 15
Joined: Fri May 15, 2015 10:27 am

Re: Determine if device belongs to IoT family

Sat May 30, 2015 6:50 am

That's what the RPi2 returns

Code: Select all

using static Windows.ApplicationModel.Resources.Core.ResourceContext;

var devicefamily = GetForCurrentView().QualifierValues["DeviceFamily"];
    if (devicefamily != "Universal")
        return false;

Return to “Windows 10 for IoT”