addStudyFromInvitation method

Future<SmartphoneStudy> addStudyFromInvitation(
  1. ActiveParticipationInvitation invitation
)

Add a study based on an invitation which needs to be executed on this client.

This is similar to the addStudy method, but the study is created from the invitation.

Implementation

Future<SmartphoneStudy> addStudyFromInvitation(
  ActiveParticipationInvitation invitation,
) async => await addStudy(
  SmartphoneStudy(
    studyId: invitation.studyId,
    studyDeploymentId: invitation.studyDeploymentId,
    deviceRoleName: invitation.deviceRoleName ?? Smartphone.DEFAULT_ROLE_NAME,
    participantId: invitation.participantId,
    participantRoleName: invitation.participantRoleName,
  ),
);