After success call back I got different kind of orientation objects and
and I want to check whether the iPhone is in landscape or portrait orientation currently.
success call back is below:
I guess accelerometer data will give you a better idea. The accelerometer is affected by gravity so the axis with a value close to 9/-9 is the one in which the device is pointing up/down, respectively.
After success call back I got different kind of orientation objects and and I want to check whether the iPhone is in landscape or portrait orientation currently. success call back is below:
Orientation {x: 0.02584065205703885, y: -0.3507689419159716, z: -0.1126170930161808, timestamp: 1476258447743.268}