Returns the device orientation in degrees: 0, 90, 180, or 270.
BPS_API int sensor_event_get_orientation_angle(bps_event_t *event)
The SENSOR_ORIENTATION_READING event.
Library:libbps (For the qcc command, use the -l bps option to link against this library)
Fetch the device orientation angle from a SENSOR_ORIENTATION_READING event. Possible results are 0, 90, 180, or 270 degrees.
This is the device orientation angle relative to gravity, which may not match the screen orientation. For example, the device may physically be in landscape mode, but the application may be restricted to portrait mode. In such a case, this function would return an orientation angle that implies landscape mode, but the application's screen orientation would be in portrait mode.
0, 90, 180, or 270 when the function completes successfully, -1 with the errno value set otherwise.
Last modified: 2014-05-14