Search code examples
c#monoxamarin.androidandroid-sensors

Mono for Android - SensorType.RotationVector missing


According to the documentation, the SensorType enum includes a RotationVector value. Which looks like it will do what I want it to. However when I try to use it in my code it tells me 'Android.Hardware.SensorType' does not contain a definition for 'RotationVector'

Any suggestions as to where this is and how I enable it? I am using Mono for Android v4.2.5.


Solution

  • RotationVector wasn't added until API level 9 (Android v2.3).

    If you update your app to target v2.3 you will get access to that value in the enumeration.