People who got themselves a Google Nexus 5X from LG were surprised when the photos they snapped using some third-party Android apps were upside down. However, worry not, it's not a faulty hardware — your phone is just too "out of the ordinary" for most third-party camera apps.
In a post on Nov. 6, Redditor gammaplay, a developer of the QR & Barcode Scanner Android app, posted the contents of an email he received from LG, asking him to update his app to resolve the inverted images when taking pictures, scanning and even video calling.
The issue has to do with the H/W limitation of the device.
"Google said that should be fixed in app side," reads the post.
Apparently, the camera placed in the Nexus 5X is rotated at 180 degrees but third-party apps are "not correctly checking the sensor orientation of the device."
A couple of days later, Redditor etalvala responded and confirmed LG's email. The tech lead for Android's camera framework, etalvala said that there are two ways to mount image sensors on an Android device. Most devices are using one way and hence, most third-party apps were never tested on the other way.
"Because of manufacturing reasons, we needed to mount the Nexus 5X main sensor in the less-common (reverse landscape) orientation — the wires from the sensor chip wouldn't have fit otherwise," etalvala explained.
The Android rep further explained that the old camera application programming interface (API), which most apps use, requires developers to set application preview rotations. And while the default rotation turns out to be correct for a forced-landscape app, most apps never check the display orientation method.
The newer API, camera2, handles the rotation automatically but developers need to transition to the new instruction set. For developers who want to stick with the old API, etalvala emphasized that they need to check the UI orientation and sensor using the boilerplate in the developer docs for the correct rotation to be applied.
Furthermore, etalvala mentioned that the same problem plagues the Nexus 6P's front-facing camera. Android users should notify the developers about the glitch so that the apps can be updated to work with the new API.