Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,15 @@ ID can be used with `navigator.compass.clearWatch` to stop watching the navigato

var watchID = navigator.compass.watchHeading(onSuccess, onError, options);

### Update 29/08/2022

On Android, the plugin used a `Sensor.TYPE_ORIENTATION` which is [deprecated](https://developer.android.com/guide/topics/sensors/sensors_position).
This sensor was more and more [omitted](https://github.com/apache/cordova-plugin-device-orientation/issues/64) in new devices.
So now the plugin uses `Sensor.TYPE_ACCELEROMETER` and `Sensor.TYPE_MAGNETIC_FIELD` which are available everywhere.
They are fused together as instructed [here](https://developer.android.com/guide/topics/sensors/sensors_position#sensors-pos-orient),
except that the `SensorManager.getOrientation()` has a [bug that will not be fixed](https://issuetracker.google.com/issues/37127944).
[Stochastically](https://stackoverflow.com/users/2110762/stochastically) found a [solution](https://stackoverflow.com/questions/15537125/inconsistent-orientation-sensor-values-on-android-for-azimuth-yaw-and-roll/16418016#16418016) that works like a charm and is used here.


### Browser Quirks

Expand Down
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading