Overview

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

VLDBluetoothPassiveManager.sharedInstance().peripheralIDs = nil

Cordova

javascript

Copy

ValidicMobile.BLE.setPassiveReadPeripheralIDs({
    peripheralIDs: []
});

Xamarin Android

csharp

Copy

PassiveBluetoothManager.Instance.PassivePeripherals = null;

Xamarin iOS

csharp

Copy

VLDBluetoothPassiveManager.SharedInstance().PeripheralIDs = null;

Note: After stopping passive listening:

User Experience Recommendations

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

  2. Add clear user education explaining:

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