1

Is there any good libraries/packages out there for detecting information about the device that visitis my page. For instance if a user goes to my page I would like to detect the platform, the version of the platform, screensize, manufacture and model..

I have tried with 51Degress.mobi but once I checked the value of Request.Browser.Platform the value was "Uknown"...and that was when I used my android-phone..which isnt a uncommon platform these days..so I sort of lost the trust of that.. or maybe I did something wrong? All i did was install it using nuGet..

Oh and yeah, I would like to do this server-side.. just to make that clear :)

Thanks in advance!

McGarnagle
  • 101,349
  • 31
  • 229
  • 260
Inx
  • 2,364
  • 7
  • 38
  • 55
  • Androids are notorious for having different UA strings for practically every device... still, that does seem pretty lame. – McGarnagle Apr 11 '12 at 10:15

2 Answers2

1

I am currently working for 51Degrees.mobi.

The reason that that property is returning "Unknown" is that I assume you are using the free Lite data set as apposed to the Premium data? As the property you are trying to access is only available in our premium version. For a list of properties available in the Premium and Lite versions please see here.

Out of the data you mentioned you are interested in knowing, the Lite version can tell you whether it is mobile and the screen height and width in pixels. The other information is only available if you purchase the premium version.

Hope this helps :)

Chris B
  • 925
  • 4
  • 14
0

Use the http classes to get the request header and parse the user-agent value.

Jack
  • 5,680
  • 10
  • 49
  • 74
  • Yeah.. but aint the pattern different for all browsers/devices?..so to make that accurate I would first have to determine which type of pattern to use to parse it, and then do the parsing? – Inx Apr 11 '12 at 10:21
  • Pattern? You can create a regular expression to search for keywords like Android or Windows and the text after that should be the version number followed by a semicolon. You can get the browser too, just get the names of popular browsers. Don't thin you can get hardware information though. – Jack Apr 11 '12 at 10:42