0

Recently we have started expanding our App to support Surface Hub(both 55-inch & 84-inch). At many places we designed entirely different set of UIs for Hub thus the need come up to identify the device is Surface Hub or not so that we could show the specific UI.

I explored various Device identification/Input Apis but unfortunately none of them provides any lead on identifying a device.

I don't remember it fully but I guess I read it somewhere that now UWP SDK doesn't allow developers to identify specific device types since UWP app is expected to run on all kinds of Win 10 running devices - may be someone could confirm this. However since the Resolution of Hubs are much higher than normal Desktop/Tablet devices I'm sure showing various UIs can be manipulated using VisualState triggers.

Still it'd be great if somehow I would be able to identify whether a device is Surface Hub or not before my App starts running, more like identifying whether touch capabilities are present on the current device.

Hopefully someone would be able to help me out with a reasonable solution here!

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
Dash
  • 804
  • 1
  • 9
  • 16

2 Answers2

0

This article suggests multiple times that Surface Hub has its own device family, but this article says that only apps targeting the Universal device family will run on Surface Hub, and makes no mention of a Surface Hub device family or some sort of digital whiteboard device family that the device will advertise itself as being a part of.

However, there's a class called Windows.System.Profile.Shared​Mode​Settings that contains an IsEnabled property that only returns true either on a PC with a certain policy enabled, or a Surface Hub. Using that in combination with VisualState triggers, and perhaps even Windows.Devices.Input.TouchCapabilities.TouchPresent, is probably the closest you'll get to determining if the device is a Surface Hub using feature detection.

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
  • Yes I thought of some combination like this but the problem lies here is the loopholes. For example if on a desktop the policy is enabled and the app detected it and showed Hub specific UI then it's all messed up. Honestly this is something I'm planning to do if nothing else comes handy. Thanks. – Dash May 12 '17 at 06:24
0
if(AnalyticsInfo.VersionInfo.DeviceFamily == "Windows.Team")
{
    // surface hub
}

There are some way to have the tailored UI for each device families. Yes, one is device trigger. Or, you can have the totally separate view (XAML) for Surface hub.

For example, you can select the main view at app.xaml.cs:

rootFrame = new Frame();
if(AnalyticsInfo.VersionInfo.DeviceFamily == "Windows.Team")
{
    // surface hub
    rootFrame.Navigate(typeof(MainPageForSurfaceHub), e.Arguments)
}
else
{
    rootFrame.Navigate(typeof(MainPage), e.Arguments)
}

Following presentation will help you.

Surface Hub: Building Windows Universal Apps for Surface Hub and the Large Screen

Mamoru Satoh
  • 2,670
  • 23
  • 23
  • Have you tested this condition on an actual Surface Hub: if(AnalyticsInfo.VersionInfo.DeviceFamily == "Windows.Team") – Dash May 12 '17 at 07:15
  • Nope. I have no chance to use the actual surface hub. But this detection code is not a special one. Many of uwp app use such of code to detect the Windows.Desktop, Windows.Mobile, etc. And, Surface hub is a family of Wnidows.Team. – Mamoru Satoh May 12 '17 at 07:45
  • Thanks for the info. Will check and add my comments shortly. – Dash May 12 '17 at 07:50