apache / apache/cordova-plugin-device-orientation
Increasing reports of compass not working on some android devices
- Dominant language
- JavaScript
- Stars
- 63
- Forks
- 80
- PR merge metrics
- No merged PRs in 30d
Description
# Bug Report
## Problem
I've had an app released for a few years using this plugin to provide magnetic heading data in order to orient a compass. Increasingly in the last year I've had customers report that the compass isn't working on a selection of android phones, all of which have magnetometer sensors.
Devices are:
Motorola Razr 5g
Sony Xperia 5 ii
Motorola G6
### What does actually happen?
navigator.compass is returning false, implying that the compass sensor is not recognised.
Investigated switching to W3C orientation, but it does not give magnetic heading so is not fit for purpose. This plugin has been great for me.
## Information
Using plugin v2.01 - Cordova 9.0
## Checklist
- [ X] I searched for existing GitHub issues
- [X ] I updated all Cordova tooling to most recent version
- [X ] I included all the necessary information above
Contributor guide
Research direction
Start from the navigator.compass entry point and reproduce the false result on the listed Android devices using plugin v2.01 with Cordova 9.0. Compare the Android sensor-detection behavior across affected devices and establish whether the issue can be fixed or must be documented as a device limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, javascript
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100