The Device Sensor detects information about the current display, including browser, browser version, OS, language, client (window) width, and total screen width. It can be used to change behavior and display, depending on the platform the Coach is being run on (such as displaying a mobile version on phones).
Like almost all SPARK controls, you can trigger events that are fired when the user interacts with the control (see the Event and Methods sections below and the Event Handling article for more information).
This control needs to be used in conjunction with other controls in order to display device information.
This is the configuration option for the Device Control...
Using the getDeviceInfo method, information about the device can be displayed. This example uses two Output Text controls...
Note: The Control Id for the Device Sensor is Sensor
This is the result...
With the Device Sensor, there is 1 type of event handler:
- On Load When the page loads
For detailed information on the available methods for this control, access the JS Doc file.
- Author: Courtney Silva
- Date Created: June 21, 2015
- Date Modified: July 27, 2015