Open
Description
Bug Report
Problem
When subscribing to a watchHeading
function, I get a CompassError {code: 3}
response. It works on older Android phones. I haven't tested iOS. If I browsed the code correctly. The error code is neither one of CompassError.COMPASS_INTERNAL_ERR CompassError.COMPASS_NOT_SUPPORTED
.
What is expected to happen?
It should work.
What does actually happen?
I get an undocumented CompassError
.
Information
It doesn't work on Android 10.
Command or Code
import { DeviceOrientation } from '@ionic-native/device-orientation/ngx';
constructor(
private deviceOrientation: DeviceOrientation
) { }
this.compass = this.deviceOrientation.watchHeading({frequency: 500}).subscribe(data => {
// logic
});
Environment, Platform, Device
I used Angular 11, Ionic framework 5 and Capacitor.
Version information
ionic info
output:
Ionic:
Ionic CLI : 6.13.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.6.4
@angular-devkit/build-angular : 0.1102.8
@angular-devkit/schematics : 9.1.0
@angular/cli : 11.2.8
@ionic/angular-toolkit : 2.3.3
Capacitor:
Capacitor CLI : 2.4.7
@capacitor/core : 2.4.7
Cordova:
Cordova CLI : 9.0.0 ([email protected])
Cordova Platforms : not available
Cordova Plugins : not available
Utility:
cordova-res (update available: 0.15.3) : 0.15.2
native-run (update available: 1.3.0) : 1.2.2
System:
Android SDK Tools : 26.1.1 (/Users/datigo/Library/Android/sdk)
ios-deploy : 1.10.0
ios-sim : ios-sim/9.0.0 darwin-x64 node-v12.18.3
NodeJS : v12.18.3 (/usr/local/Cellar/node@12/12.18.3/bin/node)
npm : 6.14.6
OS : macOS Catalina
Xcode : Xcode 12.4 Build version 12D4e
Checklist
- I searched for existing GitHub issues
- I updated all Cordova tooling to most recent version
- I included all the necessary information above
Metadata
Metadata
Assignees
Labels
No labels