I am using react-native-ble-plx library to connect to Xsens DOT sensors. The sensors transmit data at different data output rates (4Hz, 10Hz,20Hz,60Hz[default]) over Bluetooth.
When I set the Data output rate below 20Hz the application runs fine but when I set it to 60Hz, the application hangs, and all the touch options and components freeze. On the console I am able to see a warning: Please report: Excessive number of pending callbacks: 501. Some pending callbacks that might have leaked by never being called from native code.
I am using the monitorCharacteristics() method which returns a promise object. What should I do so that the application doesn't freeze? Also is there a way where I can monitor the performance of the app?
bleManager.monitorCharacteristicForDevice(props.device.id,serviceUUID,charUUID_N,(err,char)=>{
if (err){
console.error(err)
}
console.info(char.value)
})