...
When the app completes each activity, it will need to call the Update Activity API to mark that activity as completed.
...
Sending Notifications
In order for the app to receive SMS notifications, the app will need to call the Create Notification Registration API.
Open Question: How does the notification get routed to the app? Does AWS take care of this?We want to be able to send SMS notifications on an individual basis. Topics and subscriptions doesn't really fit the use case, so we'll need to create a worker facing "send SMS to user" API. Note that this message should be marked as "Promotional" rather than "Transactional", since it's not really transactional in nature.
SMS vs In-App Notifications
...
We need to give users a way to opt-out of receiving SMS notifications. We only send SMS notifications if a user hasn't engaged with their study burst in 2+ days, so at that point, opting out of SMS notifications should also opt the user out of the study. So the users will need to respond to the SMS with "QUIT STUDY" to opt out.Open Question: How to handle opt-outs? Can this be configured in AWS?. AWS handles this automatically for us (see https://docs.aws.amazon.com/sns/latest/dg/sms_manage.html#sms_manage_optout). Part of the notification should inform the user that they can choose to quit the study replying with QUIT.
Important: SMS opt-out is account wide. If a user opts out of SMS from Bridge, this means they also no longer receive SMS to verify their phone or get a phone sign-in link for any study.
Also note that, unlike email, we don't get any notifications if a user opts out of SMS. We have to manually poll SNS to determine users who have opted out. As a Stretch Goal, we can build a system to poll users who have opted out of SNS and withdraw them from the study.
Activity Burst Notification Worker
...