ConnectivitySamplingPackage
The sampling package for collecting connectivity, wifi, Bluetooth and beacon data.
Register it before you deploy a protocol that uses its measure types:
SamplingPackageRegistry().register(ConnectivitySamplingPackage());
Key points:
- BLUETOOTH can be configured with a BluetoothScanPeriodicSamplingConfiguration to filter the scan on services or device ids.
- BEACON needs a BeaconRangingPeriodicSamplingConfiguration with at least one BeaconRegion; otherwise the BeaconProbe does not start.
- On registration, adds bluetoothNameAnonymizer and wifiNameAnonymizer to the default PrivacySchema.
- Inheritance
-
- Object
- SamplingPackage
- SmartphoneSamplingPackage
- ConnectivitySamplingPackage
Constructors
ConnectivitySamplingPackage
Constants
BEACON
Measure type for Beacon ranging to detect and estimate proximity to Bluetooth beacons (e.g., iBeacon, Eddystone). Collects beacon identifiers (UUID, major, minor), estimated distance and RSSI while the phone is inside a monitored region.
- Event-based measure.
- Uses the Smartphone primary device for data collection.
- Use a BeaconRangingPeriodicSamplingConfiguration for configuration.
- Collected as BeaconData data.
BLUETOOTH
Measure type for collection of nearby Bluetooth devices on a regular basis.
- Event-based (Periodic) measure - default every 10 minutes for 10 seconds.
- Uses the Smartphone primary device for data collection.
- Use a PeriodicSamplingConfiguration or a BluetoothScanPeriodicSamplingConfiguration for configuration.
- Collected as Bluetooth data.
CONNECTIVITY
Measure type for continuous collection of connectivity status of the phone (none/mobile/wifi).
- Event-based measure.
- Uses the Smartphone primary device for data collection.
- No sampling configuration needed.
- Collected as Connectivity data.
WIFI
Measure type for collection of wifi information (SSID, BSSID, IP).
- Event-based (Interval) measure - default every 10 minutes.
- Uses the Smartphone primary device for data collection.
- Use an IntervalSamplingConfiguration for configuration.
- Collected as Wifi data.
Properties
samplingSchemes
The default sampling schemes for all dataTypes in this package.
All sampling packages should defined a DataTypeSamplingScheme for each data type.
Methods
create
Creates a new Probe of the specified type. Note that type should be one of the dataTypes that this package supports. Returns null if a probe cannot be created for the type.
onRegister
Callback method when this package is being registered.