apache / apache/cordova-plugin-device-orientation
Freezing Android Apps getCurrentHeading
- Dominant language
- JavaScript
- Stars
- 63
- Forks
- 80
- PR merge metrics
- No merged PRs in 30d
Description
# Bug Report
## Problem
When calling getCurrentHeading on some ionic apps on Android devices freeze out in the field.
### What is expected to happen?
getCurrentHeading gets the heading at all times.
### What does actually happen?
getCurrentHeading doesn't return a value any more. On some devices this is even causing a crash.
## Information
the issue is described here as well.
https://github.com/danielsogl/awesome-cordova-plugins/issues/3537
--> PR will be added and linked to this issue as well.
### Command or Code
this.deviceOrientation.getCurrentHeading().then((orientation: DeviceOrientationCompassHeading) =>
LogUtil.debug('device orientation: ', orientation));
.catch((error) => LogUtil.debug('Cannot get device orientation: ', error));
### Environment, Platform, Device
many different Android devices
### Version information
"@angular-devkit/build-angular": "^16.1.4",
"@angular-devkit/core": "^16.1.4",
"@angular-devkit/schematics": "^16.1.4",
"@angular-eslint/builder": "^16.1.0",
"@angular/cli": "^16.1.4",
"@angular/compiler": "^16.1.5",
"@angular/compiler-cli": "^16.1.6",
"@angular/language-service": "^16.1.6",
"@capacitor/cli": "^5.2.2",
"@eama/egis-symbologies": "file:plugins/egis-symbologies",
"@ionic/cli": "^7.1.1",
"cordova-plugin-device-orientation": "^2.0.1",
## 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 by reading the linked awesome-cordova-plugins issue and tracing the getCurrentHeading call in cordova-plugin-device-orientation on Android. Reproduce the freeze or crash across the affected devices; done means getCurrentHeading reliably returns a heading or a handled error without freezing or crashing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java, javascript
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100