carp_communication_package 0.10.0 copy "carp_communication_package: ^0.10.0" to clipboard
carp_communication_package: ^0.10.0 copied to clipboard

outdated

CARP communication sampling package. Samples phone, sms, and calendar logs and activity.

example/lib/main.dart

import 'package:carp_communication_package/communication.dart';
import 'package:carp_mobile_sensing/carp_mobile_sensing.dart';

/// This is a very simple example of how this sampling package is used with CARP Mobile Sensing (CAMS).
/// NOTE, however, that the code below will not run.
/// See the documentation on how to use CAMS: https://github.com/cph-cachet/carp.sensing-flutter/wiki
void main() async {
  SamplingPackageRegistry().register(CommunicationSamplingPackage());

  Study study = Study("1234", "bardram", name: "bardram study");

  // adding all measure from the common schema to one one trigger and one task
  study.addTriggerTask(
      ImmediateTrigger(), // a simple trigger that starts immediately
      AutomaticTask()
        ..measures = SamplingSchema.common().getMeasureList(
          namespace: NameSpace.CARP,
          types: [
            CommunicationSamplingPackage.TELEPHONY,
            CommunicationSamplingPackage.PHONE_LOG,
            CommunicationSamplingPackage.TEXT_MESSAGE,
            CommunicationSamplingPackage.TEXT_MESSAGE_LOG,
            CommunicationSamplingPackage.CALENDAR,
          ],
        ));

  // Create a Study Controller that can manage this study, initialize it, and start it.
  StudyController controller = StudyController(study);

  // await initialization before starting
  await controller.initialize();
  controller.resume();

  // listening on all data events from the study
  controller.events.forEach(print);
}
1
likes
0
pub points
53%
popularity

Publisher

verified publishercachet.dk

CARP communication sampling package. Samples phone, sms, and calendar logs and activity.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

call_log, carp_mobile_sensing, crypto, device_calendar, flutter, json_annotation, sms

More

Packages that depend on carp_communication_package