Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The SDK can’t actually unpair a device from a phone. It should be an end-user action to remove the BLE connection from their OS. This ensures user consent to remove a device from the phone’s settings.

With that said, there are some things you can do to disconnect the SDK from listening for readings in the background and additional steps you could take in your app to guide the user to the BLE settings in their OS and allow them to take the action of removing the device from the phone’s settings.

How do I get the SDK to stop listening passively to the device?

If you have enabled passive listening to your integration of the SDK, then you would want to take a look at the passive read elements of the BLE integration. The net effect when you stop listening is you do not receive readings in the background from that device. It does continue to display as a paired Bluetooth device in the phone's settings if the device supports that level of pairing.

  • Android SDK

    • To stop monitoring peripherals in the background set the background peripherals to an empty set

      PassiveBluetoothManager.getInstance().setPassivePeripherals(Collections.emptySet());
  • IOS SDK

    • To disable passive reading, set the peripheralIDs property to an empty array or nil.

      VLDBluetoothPassiveManager.sharedInstance().peripheralIDs = nil
  • Xarmin Android Framework Wrapper

    • To stop monitoring peripherals in the background set the background peripherals to null or an empty set

      PassiveBluetoothManager.Instance.PassivePeripherals = null;
  • Xarmin IOS Framework Wrapper

    • To disable passive reading, set the peripheralIDs property to an empty array or nil.

      VLDBluetoothPassiveManager.SharedInstance().PeripheralIDs = null;

Prompt the end user to disable the BLE connection to the device in their OS settings

Additionally, you could build a function in your app that once you tell the SDK to stop listening for the device you could remind the user to remove it from their BLE connections. You could even launch them over to BLE settings from your app. This will allow the end user to give their consent to remove the device from the phone’s settings by taking the action themselves.

  • No labels