componentDidMount() {
SensorManager.startOrientation(5000); // Minimum delay does not work :(
DeviceEventEmitter.addListener("Orientation", orientation => {
SensorManager.stopOrientation();
alert(JSON.stringify(orientation));
});
}
This causes my component to popup an alert over 15 times before actually stopping. Is there anything I could do to only render once? Any help would be much appreciated! Thank you in advanced!
This causes my component to popup an alert over 15 times before actually stopping. Is there anything I could do to only render once? Any help would be much appreciated! Thank you in advanced!