DeviceInfo
The DeviceInfo class provides access to the device the user is using to browse the Magentrix solution.
Properties
| Name | Description |
|---|
| Name | Name of the device |
| BrandName | Brand name of the device such as Samsung, Apple, etc. |
| DeviceOS | User's operating system |
| DeviceOSVersion | User's operating system version |
| Browser | User's browser name |
| IsMobile | Returns true if the user's device is a mobile phone or tablet. |
| IsTablet | Returns true if the user's device is tablet. |
Note that due to the complexity of the parsing browser user-agents, there is no guarantee that the device operating system or brand name information will always be accurate. You can access the DeviceInfo class directly in ActivePage and via its provider in Active Classes.
Below is an example of accessing the DeviceInfo in an Active Class:
var deviceInfo = UserDeviceDetector.GetCurrentUserDevice();