DeviceSensors

Wisej.Hybrid.DeviceSensors

Namespace: Wisej.Hybrid

Assembly: Wisej.Hybrid (3.5.0.0)

Provides integrations to interact with device sensors.

public class DeviceSensors

Access this class through the Device singleton.

Constructors

DeviceSensors()

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

Methods

IsMonitoring(type)

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

Parameter
Type
Description

type

The type of sensor.

Returns: Booleanarrow-up-right. True if the given SensorType is available for monitoring.

IsSupported(type)

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

Parameter
Type
Description

type

The type of sensor.

Returns: Booleanarrow-up-right. True if the given SensorType is supported.

Start(type)

Starts monitoring the given SensorType on the hybrid device.

Parameter
Type
Description

type

The type of sensor.

Stop(type)

Stops monitoring the given SensorType on the hybrid device.

Parameter
Type
Description

type

The type of sensor.

Events

AccelerometerChanged

EventHandler<AccelerometerChangedEventArgs>arrow-up-right Occurs when accelerometer reading changes.

BarometerChanged

EventHandler<BarometerChangedEventArgs>arrow-up-right Occurs when barometer reading changes.

CompassChanged

EventHandler<CompassChangedEventArgs>arrow-up-right Occurs when compass reading changes.

GyroscopeChanged

EventHandler<GyroscopeChangedEventArgs>arrow-up-right Occurs when gyroscope reading changes.

MagnetometerChanged

EventHandler<MagnetometerChangedEventArgs>arrow-up-right Occurs when magnetometer reading changes.

OrientationSensorChanged

EventHandler<OrientationSensorChangedEventArgs>arrow-up-right Occurs when the orientation sensor reading changes.

ReadingChanged

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

Shake

EventHandlerarrow-up-right Occurs when the device is shaken.

Last updated