BluetoothScanPeriodicSamplingConfiguration class
A sampling configuration specifying how to scan for Bluetooth devices on a regular basis for a specific period.
Used with the ConnectivitySamplingPackage.BLUETOOTH measure. A scan
starts every interval and runs for duration. The scan is filtered on
withServices and withRemoteIds to only collect data from specific
services and remote ids. Empty lists mean no filtering.
Filtering on remoteIds allows Android to scan for devices in the background without needing to be in the foreground. This is not possible on iOS.
- Inheritance
-
- Object
- Serializable
- SamplingConfiguration
- IntervalSamplingConfiguration
- PeriodicSamplingConfiguration
- BluetoothScanPeriodicSamplingConfiguration
- Annotations
-
- @JsonSerializable.new(includeIfNull: false, explicitToJson: true)
Constructors
-
BluetoothScanPeriodicSamplingConfiguration({required Duration interval, required Duration duration, List<
String> withServices = const [], List<String> withRemoteIds = const []}) -
BluetoothScanPeriodicSamplingConfiguration.fromJson(Map<
String, dynamic> json) -
factory
Properties
- $type ↔ String?
-
The type name written to
__typein JSON; set tojsonTypeon creation.getter/setter pairinherited - duration ↔ Duration
-
How long each sampling window lasts.
getter/setter pairinherited
- fromJsonFunction → Function
-
The generated function that converts a JSON map to an object of this type.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- interval ↔ Duration
-
Sampling interval (i.e., delay between sampling).
getter/setter pairinherited
- jsonType → String
-
The
__typeused for JSON serialization of this class.no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
withRemoteIds
↔ List<
String> -
List of remote device IDs to filter the scan results.
getter/setter pair
-
withServices
↔ List<
String> -
List of Bluetooth service UUIDs to filter the scan results.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Returns a JSON map of this object, including the
__typeproperty.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited