Skip to content

communication

A sampling package that collects phone calls, text messages and calendar entries.

Register CommunicationSamplingPackage in the SamplingPackageRegistry to use these measure types in a protocol:

  • dk.cachet.carp.phonelog - the phone call log (PhoneLog). Android only.
  • dk.cachet.carp.textmessagelog - the text message (SMS) log (TextMessageLog). Android only.
  • dk.cachet.carp.textmessage - incoming text messages (TextMessage). Android only.
  • dk.cachet.carp.calendar - calendar entries (Calendar). Android and iOS.

All measures use the Smartphone primary device. Phone numbers, message content and calendar titles are hashed by the default PrivacySchema (see textMessageAnonymizer and related functions).

Classes

  • Calendar — The calendar events on the device in a period.
  • CalendarEvent — A calendar event, as listed in a Calendar.
  • CalendarProbe — Collects the events in all calendars on the phone as Calendar data.
  • CommunicationSamplingPackage — The sampling package for collecting phone calls, text messages and calendar entries.
  • PhoneCall — A phone call, as listed in a PhoneLog.
  • PhoneLog — The phone log, i.e. the list of phone calls made on the device in a period.
  • PhoneLogProbe — Collects the phone call log from this device as PhoneLog data.
  • TextMessage — A text message (SMS).
  • TextMessageLog — The text (SMS) messages on the device.
  • TextMessageLogProbe — Collects all text (SMS) messages on this device as TextMessageLog data.
  • TextMessageProbe — Collects a TextMessage every time this device receives an SMS message.

Functions

backgroundMessageHandler

void backgroundMessageHandler(
  1. SmsMessage message
)

Handles incoming SMS messages while the app is in the background.

Must be a top-level function so the telephony plugin can call it from a background isolate. Passed to listenIncomingSms by TextMessageProbe.

calendarAnonymizer

Data calendarAnonymizer(
  1. Data data
)

Anonymizes each CalendarEvent in a Calendar using calendarEventAnonymizer.

Registered in the default PrivacySchema for the CommunicationSamplingPackage.CALENDAR measure.

calendarEventAnonymizer

CalendarEvent calendarEventAnonymizer(
  1. CalendarEvent event
)

Anonymizes a CalendarEvent by replacing its title and description with SHA-1 hashes.

phoneCallAnonymizer

PhoneCall phoneCallAnonymizer(
  1. PhoneCall call
)

Anonymizes a PhoneCall by replacing its formatted number, number and name with SHA-1 hashes.

phoneLogAnonymizer

Data phoneLogAnonymizer(
  1. Data data
)

Anonymizes each PhoneCall in a PhoneLog using phoneCallAnonymizer.

Registered in the default PrivacySchema for the CommunicationSamplingPackage.PHONE_LOG measure.

textMessageAnonymizer

TextMessage textMessageAnonymizer(
  1. Data data
)

Anonymizes a TextMessage by replacing its address and body with SHA-1 hashes.

Registered in the default PrivacySchema for the CommunicationSamplingPackage.TEXT_MESSAGE measure.

textMessageLogAnonymizer

Data textMessageLogAnonymizer(
  1. Data data
)

Anonymizes each TextMessage in a TextMessageLog using textMessageAnonymizer.

Registered in the default PrivacySchema for the CommunicationSamplingPackage.TEXT_MESSAGE_LOG measure.