4

Is there an easy way to detect if my C# Windows 8 Store application is running on a Microsoft Surface RT vs a Surface Pro 1/2/3 vs something else?

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
Scott Lerch
  • 2,620
  • 1
  • 23
  • 34

3 Answers3

1

Source code: https://github.com/AttackPattern/CSharpAnalytics/tree/master/Source/CSharpAnalytics/SystemInfo

Usage:

var Model = await WindowsStoreSystemInfo.GetDeviceModelAsync();

Examples on my devices:

Model: "MacBookPro9,2"
Model: "Surface with Windows RT"
Model: "Surface with Windows 8"

I don't have Surface 2 or 3, so I can't tell, but I think they give "Surface Pro 2" or "Surface Pro 3". Needs to be confirmed.

Cœur
  • 37,241
  • 25
  • 195
  • 267
  • Thanks, I figured it would require something like that. I only have a Surface RT hopefully someone else can confirm with Surface Pro 2 or 3. – Scott Lerch Aug 01 '14 at 22:49
0

I doubt there's an API to detect a specific brand of hardware. There were questions before about detecting which version of Windows you are running with answers that might help, but overall - you shouldn't use that knowledge in your app.

Community
  • 1
  • 1
Filip Skakun
  • 31,624
  • 6
  • 74
  • 100
0

Application Insights.

You can identify what users are doing in your app as well as the type of operating system they have. This is supported on Visual Studio 2013 Update 2.

You don't have to do any coding to get basic data such as session time, OS, screen resolution, app version.

http://msdn.microsoft.com/en-us/library/dn509554.aspx

Scott Nimrod
  • 11,206
  • 11
  • 54
  • 118