You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to implement reconnecting device after loosing bluetooth connection (for example because of leaving the bluetooth range). Therefore I register a listener with "Device.on('disconnect', ...)". One issue is if I call this after "Adapter.waitDevice(...)" promise on the received device, no events will be emitted. Therefore I call "Adapter.getDevice(...)" and register disconnect listener. Now the event is emitted. But for some reasons I like remove the "disconnect event listener" from Device, but this does not work.
I can see in your source, that the 'disconnect' - event is forwarded from BusHelper-propertiesChanged-event. Is this the reason that I can not unregister the listener for 'disconnect'-events on Device?
The text was updated successfully, but these errors were encountered:
I try to implement reconnecting device after loosing bluetooth connection (for example because of leaving the bluetooth range). Therefore I register a listener with "Device.on('disconnect', ...)". One issue is if I call this after "Adapter.waitDevice(...)" promise on the received device, no events will be emitted. Therefore I call "Adapter.getDevice(...)" and register disconnect listener. Now the event is emitted. But for some reasons I like remove the "disconnect event listener" from Device, but this does not work.
I can see in your source, that the 'disconnect' - event is forwarded from BusHelper-propertiesChanged-event. Is this the reason that I can not unregister the listener for 'disconnect'-events on Device?
The text was updated successfully, but these errors were encountered: