Use this API to remove the bluetooth adapter with a state change.
In order to prevent multiple callbacks of an event, which are resulted from multiple registered event listeners, it is recommended to call off method to listen for an event and close the previous event listener, before you call on method.
Currently simulation in IDE is not supported. Please debug in the production environment.
Transmitting Callback Values
If you don't transmit the callback value, all the event listener callbacks will be removed. See the below code sample for more information:
If you transmit the callback value, the corresponding callbacks will be removed. See the below code sample for more information: