communication library

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(SmsMessage message) → void
Handles incoming SMS messages while the app is in the background.
calendarAnonymizer(Data data) → Data
Anonymizes each CalendarEvent in a Calendar using calendarEventAnonymizer.
calendarEventAnonymizer(CalendarEvent event) → CalendarEvent
Anonymizes a CalendarEvent by replacing its title and description with SHA-1 hashes.
phoneCallAnonymizer(PhoneCall call) → PhoneCall
Anonymizes a PhoneCall by replacing its formatted number, number and name with SHA-1 hashes.
phoneLogAnonymizer(Data data) → Data
Anonymizes each PhoneCall in a PhoneLog using phoneCallAnonymizer.
textMessageAnonymizer(Data data) → TextMessage
Anonymizes a TextMessage by replacing its address and body with SHA-1 hashes.
textMessageLogAnonymizer(Data data) → Data
Anonymizes each TextMessage in a TextMessageLog using textMessageAnonymizer.