CommunicationSamplingPackage class
The sampling package for collecting phone calls, text messages and calendar entries.
Register it before you deploy a protocol that uses its measure types:
SamplingPackageRegistry().register(CommunicationSamplingPackage());
Key points:
- PHONE_LOG, TEXT_MESSAGE_LOG and TEXT_MESSAGE only work on Android.
On other platforms create returns
null, so no probe runs. - CALENDAR works on Android and iOS.
- On registration, adds anonymizers for all four measure types to the
default
PrivacySchema(see textMessageAnonymizer, textMessageLogAnonymizer, phoneLogAnonymizer and calendarAnonymizer).
- Inheritance
-
- Object
- SamplingPackage
- SmartphoneSamplingPackage
- CommunicationSamplingPackage
Constructors
Properties
-
dataTypes
→ List<
DataTypeMetaData> -
The data types this package supports.
no setterinherited
-
deviceManager
→ DeviceManager<
DeviceConfiguration< DeviceRegistration> , DeviceRegistration> -
Get the
DeviceManagerfor the device used by this package.no setterinherited - deviceType → String
-
The type of device this package collects data from.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- samplingSchemes → DataTypeSamplingSchemeMap
-
Default sampling schemes. PHONE_LOG, TEXT_MESSAGE_LOG and CALENDAR
use a
HistoricSamplingConfigurationof one day back and one day forward in time.no setteroverride
Methods
-
create(
String type) → Probe? -
Creates a new
Probeof the specifiedtype. Note thattypeshould be one of the dataTypes that this package supports. Returns null if a probe cannot be created for thetype.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onRegister(
) → void -
Called when this package is registered in the
SamplingPackageRegistry.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- CALENDAR → const String
- Measure type for collection of calendar entries from the calendar on the phone for a specific time period.
- PHONE_LOG → const String
- Measure type for collection of the phone log for a specific time period.
- TEXT_MESSAGE → const String
- Measure type for collection of text messages (SMS) as they are received.
- TEXT_MESSAGE_LOG → const String
- Measure type for collection of the text message (SMS) log for a specific time period.