Storing & getting the device orientation (yaw, pitch, roll) when taking a photo I want to take a photo and use the stored GPS coordinates and the orientation of the phone to do some calculations. How can I access that information?

Alternatively if there is an API to do that I could make my own app.
This is one of those problems that I believe requires a documented standard:  the same reason every platform trivially accesses the GPS location of a photo is because of EXIF and it's standardized tags.

EXIF is not user-extensible, and side car files are too namespace-y (proprietary).

Unless I'm wrong about there not being a standard place for Euler angles or even the quaternion that establishes device attitude.