NeoLSN / cordova-plugin-gyroscope

Cordova Device Gyroscope Plugin
9 stars 14 forks source link

Error: no sensors found to register gyroscope listening to #6

Open ricopo1 opened 7 years ago

ricopo1 commented 7 years ago

I'm trying to get the speed x,y,z positions using this code:

methods: {
    startGyroscope: function() {
        alert("start Gyroscope")
        navigator.gyroscope.getCurrent(this.onSuccess, this.onError);
    },
    onSuccess (speed) {
        alert("success")
        this.speed.x = speed.x
        this.speed.y = speed.y
        this.speed.z = speed.z
        this.speed.timestamp = speed.timestamp
    },
    onError (err) {
        alert("code: " + err.code + " message: " + err.message)
    }
  }

I call the startGyroscope when the page is loaded Error code 3 with this message "no sensors found to register gyroscope listening to"

NeoLSN commented 7 years ago

Which device were you using?

jasminepoly commented 7 years ago

did it work for u ? if yes can u post an example please.