Problem with gyroscope callback method

Hello, I have a little problem with the gyroscope Sensor and its callback function.

I first unregister all listeners, then I add an option and then register the gyroscope and about the callback method.

The problem is that the only time I get the callback to work is when I close the app.