It's already supported by the official Touch plugin. As documented in the manual:
> Alpha is the compass direction in degrees.
Thanks Ashley for your reply.
I know Touch plugin already returns compass direction since C2, but it returns only gyroscopic heading not true heading from north direction (magnetic north).
I just tried to compile an apk from last C3 r195, and tested this:
Each time I restart my app I get different value for Alpha, for same direction from the magnetic north.
Maybe checking this link may explain exactly what I mean: w3.org/TR/orientation-event
4.2. deviceorientationabsolute Event And 4.3. compassneedscalibration Event
When I use cordova-plugin-device-orientation I can get abolute magneticHeading not gyroscopic heading.
I compiled some app on android and iOS, it happends sometime when I prompt the watch heading command, that the phone ask for calibrating the compass.
If Touch plugin is not yet supporting absolute compass direction, I hope if there is any way adding cordova-plugin-device-orientation to C3 runtime, because I really need it for my project.
Thanks again for your reply.