Skip to main content

DeviceSensors

Namespace: Wisej.Hybrid

Assembly: Wisej.Hybrid

Provides integrations to interact with device sensors.

public class DeviceSensors

Access this class through the Device singleton.

Constructors

Instance memberDeviceSensors()

Initializes a new instance of DeviceSensors and attaches to sensor events.

Methods

Instance memberIsMonitoring(type)

Gets whether the given SensorType is available for monitoring on the hybrid device.

ParameterTypeDescription
typeSensorTypeThe type of sensor.

Returns: Boolean. True if the given SensorType is available for monitoring.

Instance memberIsSupported(type)

Gets whether the given SensorType is supported on the hybrid device.

ParameterTypeDescription
typeSensorTypeThe type of sensor.

Returns: Boolean. True if the given SensorType is supported.

Instance memberStart(type)

Starts monitoring the given SensorType on the hybrid device.

ParameterTypeDescription
typeSensorTypeThe type of sensor.

Instance memberStop(type)

Stops monitoring the given SensorType on the hybrid device.

ParameterTypeDescription
typeSensorTypeThe type of sensor.

Events

Instance memberAccelerometerChanged

EventHandler<AccelerometerChangedEventArgs> Occurs when accelerometer reading changes.

Instance memberBarometerChanged

EventHandler<BarometerChangedEventArgs> Occurs when barometer reading changes.

Instance memberCompassChanged

EventHandler<CompassChangedEventArgs> Occurs when compass reading changes.

Instance memberGyroscopeChanged

EventHandler<GyroscopeChangedEventArgs> Occurs when gyroscope reading changes.

Instance memberMagnetometerChanged

EventHandler<MagnetometerChangedEventArgs> Occurs when magnetometer reading changes.

Instance memberOrientationSensorChanged

EventHandler<OrientationSensorChangedEventArgs> Occurs when the orientation sensor reading changes.

Instance memberReadingChanged

Deprecated memberDeprecated: This event will be removed in future releases in favor of sensor-specific events. EventHandler<SensorChangedEventArgs> Fires when a sensor's reading changes.

Instance memberShake

EventHandler Occurs when the device is shaken.