Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magnetometer error #38

Open
sareh88 opened this issue Feb 3, 2018 · 0 comments
Open

Magnetometer error #38

sareh88 opened this issue Feb 3, 2018 · 0 comments

Comments

@sareh88
Copy link

sareh88 commented Feb 3, 2018

i am facing this error:
TypeError: undefined is not an object evaluation
mSensorManager.startMagnetometer
here is mt code :
var mSensorManager = require('NativeModules').SensorManager;

componentDidMount() {
mSensorManager.startMagnetometer(100);
DeviceEventEmitter.addListener('azimuthChanged', this.azimuthChanged.bind(this));

   this.interval = setInterval(() => {
  this.setState({
    azimuth: this.currentAzimuth
  });
}, 100);

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant