There was a previous thread here in 2021 about this, but the API has changed since and now requires magnetometer permissions as well.
There was a previous thread here in 2021 about this, but the API has changed since and now requires magnetometer permissions as well.