You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2022/05/24 18:31:18 UTC

[GitHub] [cordova-plugin-device-orientation] Syahrul opened a new issue, #69: Different value for magneticHeading in iOS and Android

Syahrul opened a new issue, #69:
URL: https://github.com/apache/cordova-plugin-device-orientation/issues/69

   ## Problem
   Different value in iOS and Android. iOS is correct
   
   ### What is expected to happen?
   Same value for both
   
   ## Information
   ```js
   this.deviceOrientation.watchHeading().subscribe((res: DeviceOrientationCompassHeading) => {
         console.log(res);
   });
   ```
   In iOS the value is 
   ```json
   {
     "headingAccuracy": 15.887619972229004,
     "magneticHeading": 15.256682395935059,
     "timestamp": 1653415919642.137,
     "trueHeading": 15.116232872009277
   }
   ```
   and in Android
   ```json
   {
       "magneticHeading": 165.015625,
       "trueHeading": 165.015625,
       "headingAccuracy": 0,
       "timestamp": 1653416203062
   }
   ```
   
   Both handphone are flat on table side by side
   
   ### Environment, Platform, Device
   Ionic Capacitor 3
   Angular 13
   Android 10
   iOS 15.3.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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-device-orientation] Syahrul commented on issue #69: Different value for magneticHeading in iOS and Android

Posted by GitBox <gi...@apache.org>.
Syahrul commented on issue #69:
URL: https://github.com/apache/cordova-plugin-device-orientation/issues/69#issuecomment-1138436461

   Turns out the issue was coming from the <uses-permissions> order in AndroidManifest.xml
   
   Previous order
   ```xml
       <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
       <uses-feature android:name="android.hardware.location.gps" />
       <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
       <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
   ```
   
   Current order
   ```xml
       <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
       <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
       <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
       <uses-feature android:name="android.hardware.location.gps" />
   ```
   
   Changing the order fix my issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-device-orientation] Syahrul closed issue #69: Different value for magneticHeading in iOS and Android

Posted by GitBox <gi...@apache.org>.
Syahrul closed issue #69: Different value for magneticHeading in iOS and Android
URL: https://github.com/apache/cordova-plugin-device-orientation/issues/69


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org