Hello!
Working with Universal Apps is quite grateful. However, before the build 10.0.10240.0, trying to find out the kind of platform that our app was running was a bit complicated.
Today we can solve it with a single line of code, using AnalyticsVersionInfo. In example:
return Windows.System.Profile.AnalyticsInfo.VersionInfo.DeviceFamily;
It returns us a value of the type:
- Windows.Desktop
- Windows.IoT
- Windows.Mobile
- Windows.Xbox
And with that we can now continue working. It is most common in this case, is the decision to use a specific API in a platform.
Greetings @ Madrid
-El Bruno
References
- JuanKRuiz Detectar la familia de dispositivos
- MSDN AnalyticsVersionInfo class