CommunicationSamplingPackage
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
CommunicationSamplingPackage
Constants
CALENDAR
Measure type for collection of calendar entries from the calendar on the phone for a specific time period.
- Collected as Calendar data.
- One-time measure.
- Uses the Smartphone primary device for data collection.
- Use a HistoricSamplingConfiguration for configuration.
PHONE_LOG
Measure type for collection of the phone log for a specific time period.
- Collected as PhoneLog data. Android only.
- One-time measure.
- Uses the Smartphone primary device for data collection.
- Use a HistoricSamplingConfiguration for configuration.
TEXT_MESSAGE
Measure type for collection of text messages (SMS) as they are received.
- Collected as TextMessage data. Android only.
- Event-based measure.
- Uses the Smartphone primary device for data collection.
- No sampling configuration needed.
TEXT_MESSAGE_LOG
Measure type for collection of the text message (SMS) log for a specific time period.
- Collected as TextMessageLog data. Android only.
- One-time measure.
- Uses the Smartphone primary device for data collection.
- Use a HistoricSamplingConfiguration for configuration.
Properties
samplingSchemes
Default sampling schemes. PHONE_LOG, TEXT_MESSAGE_LOG and CALENDAR use a HistoricSamplingConfiguration of one day back and one day forward in time.
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.