API reference for the Device Detection service
The Sitecore Device Detection module consists of the following assemblies:
Sitecore.CES.DeviceDetectioncontains the API that enables detection of devices and provides information on the device's parameters.Sitecore.CES.DeviceDetection.Rulescontains conditions that are used in Device Detection rules.
These assemblies enable you to use the following API references to further customize your Sitecore solution:
Sitecore.CES.DeviceDetection
This namespace contains the main Device Detection API classes.
| Class name | DeviceInformationProviderBase |
|---|---|
| Description | This is an abstract base class for the device information provider. You need to derive from this class to implement your own device information provider. |
| Fields |
|
| Methods |
|
| Properties |
|
| Class name | DeviceDetectionManager |
|---|---|
| Description | This is the static class that resolves device information based on a user agent string. |
| Methods |
|
| Properties |
|
| Class name | DeviceDetectionManagerBase |
|---|---|
Description | This class resolves device information based on a user agent string. |
| Methods |
|
| Properties |
|
| Class name | DefaultDeviceDetectionManager |
|---|---|
| Description | This class is the default implementation of the service that resolves device information based on a user agent string. |
| Methods |
|
| Properties |
|
| Class name | DeviceInformation |
|---|---|
| Description | This class contains basic information about a device. |
| Properties |
|
| Class name | DeviceDetectionServicesConfigurator |
|---|---|
| Description | This class represents the IServicesConfigurator for the Sitecore.CES.DeviceDetection assembly. |
| Methods |
|
- Enumeration name:
DeviceType - Description: This enumeration represents a type of device.
- Members: OtherMobilePhoneMobileConsoleEReaderTabletMediaPlayerSettopBoxCameraBotNoteThe enum DeviceType.Bot is now obsolete. To check robots, use the following code instead
Sitecore.CES.DeviceDetection.Cache
This namespace contains the Device Detection cache class.
The cache name is DeviceDetection
| Class name | DeviceDetectionCache |
|---|---|
| Description | This class implements a cache for device information and extended properties. |
| Methods |
|
Sitecore.CES.DeviceDetection.Configuration
This namespace contains the class that provides access to the settings of the Device Detection module.
| Class name | DeviceDetectionSettings |
|---|---|
| Description | This class provides access to the settings of the Device Detection module. |
| Properties |
|
Sitecore.CES.DeviceDetection.Data
This namespace contains the classes for communicating with the Sitecore cloud service.
| Class name | KeyInfo |
|---|---|
| Description | This class specifies information about the Device Detection database decryption key. |
| Properties |
|
| Class name | UpdateInfo |
|---|---|
| Description | This class contains information about database updates. |
| Properties |
|
Sitecore.CES.DeviceDetection.Diagnostics.PerformanceCounters
This namespace contains the Device Detection performance counter classes.
| Class name | DeviceDetectionCount |
|---|---|
| Description | This is a static class that provides access to the Device Detection performance counters. |
| Properties |
|
Sitecore.CES.DeviceDetection.Diagnostics.Exceptions
This namespace contains the Device Detection exception class.
| Class name | DeviceDetectionException |
|---|---|
| Description | This class represents a Device Detection exception. The API throws this exception when there is either no subscription for the Device Detection service or the provider is not initialized or it is disabled. |
Sitecore.CES.DeviceDetection.Providers.FiftyOneDegrees
This namespace implements the default provider.
| Class name | DeviceInformationProvider51Degrees |
|---|---|
| Description | This class implements the DeviceInformationProviderBase and ensures the database is updated. |
| Methods |
|
Sitecore.CES.DeviceDetection.Rules
This namespace contains the helper interface for the condition classes.
| Class name | IRuleDeviceInformationManager |
|---|---|
| Description | This interface is used to get device information for rules. |
| Methods |
|
Sitecore.CES.DeviceDetection.Rules.Conditions
This namespace contains the condition classes.
| Class name | DeviceBoolConditionBase |
|---|---|
| Description | This is an abstract class for creating rules with Boolean conditions. |
| Methods |
|
| Class name | DeviceBrowserCanJavaScriptCondition |
|---|---|
| Description | This class implements a rule that checks whether the browser can execute JavaScript. |
| Method |
|
| Class name | DeviceBrowserCondition |
|---|---|
| Description | This class implements a rule which specifies if the browser name and version meet the condition. |
| Method |
|
| Class name | DeviceBrowserHtml5AudioCanAudioCondition |
|---|---|
| Description | This class implements a rule which defines whether the browser can play HTML5 audio. |
| Method |
|
| Class name | DeviceBrowserHtml5VideoCanVideoCondition |
|---|---|
| Description | This class implements a rule which defines whether the browser can play HTML5 video. |
| Method |
|
| Class name | DeviceCanTouchScreenCondition |
|---|---|
| Description | This class implements a rule which defines whether the device and browser support touch screen. |
| Method |
|
| Class name | DeviceModelNameCondition |
|---|---|
| Description | This class implements a rule which defines whether the browser model name meets the condition. |
| Method |
|
| Class name | DeviceHardwareDisplayHeightCondition |
|---|---|
| Description | This class implements a rule which defines whether the device height meets the condition. Note that this does not work correctly for a browser. |
| Method |
|
| Class name | DeviceHardwareDisplayWidthCondition |
|---|---|
| Description | This class implements a rule which defines whether the device width meets the condition. Note that this does not work correctly for a browser. |
| Method |
|
| Class name | DeviceIntegerConditionBase |
|---|---|
| Description | This is an abstract class for creating rules with an integer condition. |
| Method |
|
| Class name | DeviceOperatingSystemModelCondition |
|---|---|
| Description | This class implements a rule which defines whether the device operating system model meets the condition. |
| Method |
|
| Class name | DeviceOperatingSystemVendorCondition |
|---|---|
| Description | This class implements a rule which defines whether the vendor of the operating system meets the condition. |
| Method |
|
| Class name | DevicePropertyCondition |
|---|---|
| Description | This class implements a rule which defines whether the extended property meets the condition. |
| Method |
|
| Properties |
|
| Class name | DeviceStringConditionBase |
|---|---|
| Description | This is an abstract class that you use to create rules with a String condition. |
| Method |
|
| Properties |
|
| Class name | DeviceTypeCondition |
|---|---|
| Description | This class implements a rule that checks whether the device type meets the condition. |
| Method |
|
| Properties |
|
| Class name | DeviceVendorCondition |
|---|---|
| Description | This class implements a rule that defines whether the device vendor meets the condition. |
| Method |
|
| Class name | DeviceTypeIds - Obsolete, use Sitecore.ContentTesting.Rules.Conditions.DeviceTypeIDs instead. |
|---|---|
| Description | This class comes from Sitecore.ContentTesting and contains the item IDs that corresponds to the device type. |
| Constants |
|