Hi - I can successfully add a device motion listener:
const motionListener = DangerZone.DeviceMotion.addListener(this.onDeviceMotion);
this.setState({
motionListener: motionListener,
});
DangerZone.DeviceMotion.setUpdateInterval(this.props.motionInterval)
But I can’t remove the listener. I’ve tried:
this.state.motionListener.remove();
which returns that it does not include the function ‘remove’
as well as
DangerZone.DeviceMotion. removeAllListeners()
which gives an error something like “attempted to remove more listeners than exist”