Detect mobile phone orientation (portrait or landscape, and what rotation)

Is there any way to detect which orientation a phone is currently in when using the Perspective app? Extending this, is it possible to know which rotation the device is in as well? e.g. “portrait - upwards”, “portrait - upside-down”, etc

so, did you find an answer to this question?

Nope, still not sure if it’s possible