I’m using SimpleOrientationSensor to get the screen orientation information in my application. I’m testing this application in Windows Simulator but I always get the sensor object’s value as null.
This is what I’m doing:
SimpleOrientationSensor sensor;
sensor = SimpleOrientationSensor.GetDefault();
if (sensor != null)
{
sensor.OrientationChanged += sensor_OrientationChanged;
}
I understand that SimpleOrientationSensor.GetDefault() will return null when there is no Sensor available. Should I tweak the Simulator to get the sensor information? Or does it even handle these changes?
According to this article the simulator doesn’t support the
SimpleOrientationSensorclass.