DefaultConnectableDeviceStore is an implementation of ConnectableDeviceStore provided by Connect SDK for your convenience. This class will be used by DiscoveryManager as the default ConnectableDeviceStore if no other ConnectableDeviceStore implementation is provided before calling startDiscovery.
As outlined in ConnectableDeviceStore, this class takes the following steps to ensure users’ privacy.
- Only ConnectableDevices that have been connected to will be permanently stored
- On load & store, ConnectableDevices that have not been discovered within the maxStoreDuration will be removed from the ConnectableDeviceStore
DefaultConnectableDeviceStore stores data in a JSON file named
Connect_SDK_Device_Store.json in the documents directory.
- double maxStoreDuration
- Max length of time for a ConnectableDevice to remain in the
ConnectableDeviceStore without being discovered. Default is 3 days,
and modifications to this value will trigger a scan for old devices.
ConnectableDevices that have been connected to will never be removed
from the device store unless
- double created
- Date (in seconds from 1970) that the ConnectableDeviceStore was created.
- double updated
- Date (in seconds from 1970) that the ConnectableDeviceStore was last updated.
- int version
- Current version of the ConnectableDeviceStore, may be necessary for migrations