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 2021/04/12 20:58:28 UTC

[GitHub] [cordova-plugin-device-orientation] breautek commented on issue #63: CompassError code 3 on Android 10

breautek commented on issue #63:
URL: https://github.com/apache/cordova-plugin-device-orientation/issues/63#issuecomment-818232652


   Error code 3 means the android device doesn't have a sensor available to use:
   
   https://github.com/apache/cordova-plugin-device-orientation/blob/ee05df544d7a0c7514a3303193bf9413d41cfcbe/src/android/CompassListener.java#L180
   
   Despite of the suppress deprecation, the method doesn't appear to be deprecated: https://developer.android.com/reference/android/hardware/SensorManager#getSensorList(int)
   
   So this suggest that your device doesn't have an Orientation sensor. The constant is [deprecated](https://developer.android.com/reference/android/hardware/Sensor#TYPE_ORIENTATION) however, so perhaps you can try replacing it with `SensorManager.getOrientation()` instead?


-- 
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.

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