Unpairing Devices in Apps Using the Validic SDK

Overview

  • The Validic SDK cannot directly unpair Bluetooth devices from phones - this must be done by the end-user through their device settings

  • On iOS, even programmatic unpairing via settings is not possible due to Apple's security model

  • However, there are two key actions you can take in your app:

    1. Stop the SDK from passively listening for device readings

    2. Guide users to their device's Bluetooth settings to manage device connections

Stopping Passive Device Listening

To prevent the SDK from receiving background readings from a device, use the appropriate code for your platform:

Android Native

java

Copy

PassiveBluetoothManager.getInstance().setPassivePeripherals(Collections.emptySet());

iOS Native

swift

Copy

Cordova

Copy

Xamarin Android

Copy

Xamarin iOS

Copy

Note: After stopping passive listening:

  • The SDK will no longer receive readings in the background

  • The device will still appear as paired in the phone's Bluetooth settings

  • The device can still be used for foreground readings if needed

User Experience Recommendations

  1. Implement a "Remove Device" option in your app that:

    • Stops SDK passive listening using the code above

    • Shows instructions for removing the device from phone settings

    • Provides a direct link to the device's Bluetooth settings

  2. Add clear user education explaining:

    • Why they might want to remove a device

    • The two-step process (stopping readings in-app and removing from phone settings)

    • The difference between stopping readings and fully unpairing

This separation of concerns ensures users maintain control over their device connections while allowing your app to properly manage SDK device monitoring.