Alarm Scheduling in Mobile EMA Apps



Summary

One powerful feature available in Pendragon Forms is the ability to schedule alarms. Alarms are often used in Electronic Momentary Assessments (EMA) or process-based systems in which you want to remind users to perform a specific activity.

The Pendragon Alarms feature allows you to perform the following configurations:

  • Set alarms that are generic to all users or specific to a target user
  • Set up to 2 reminders per alarm
  • Open a specific form per alarm
  • Set an alarm to vibrate, sound, or both
  • Define the message and message title per alarm
  • Log alarms which the user acts upon

Features

Importing of time alarm forms

Scheduling alarms

Configuring synchronization rules

Requirements

Pendragon Forms 8

Android device running the Pendragon
Forms app, version 1.8 or above

Time Alarms Forms as provided in
the importable PFF's in this example

Base Tutorial Time: 10 minutes

Tutorial

Hide and Protect Your Alarms Form

In most cases, you will not want the user to see or edit their alarms.

1. Hide the form in the forms list

In the Advanced Form Properties of the PFTimeAlarm form, go to the Behavior tab and click "Hide form in form list" under the Subforms section.

2. Prevent changes to alarms

In the Advanced Form Properties of the PFTimeAlarm form, go to the Behavior tab and click "No inserts on device","No updates on device", and "No deletions on device" under the Access rights section.

3. Publish form (important)

In order for the changes to take a affect, you must publish the form and re-sync the devices.

Optional Alarm Response Logging

Optionally, add a PFTimeAlarmLog which will automatically capture the time when a user responds to an alarm and the alarm schedule time of the notification to which they responded.

1. Add the PFTimeAlarmLog Form

Optionally, import or create the Import the PFTimeAlarmLog.pff or see the PFTimeAlarmLog section below to create the form on your own.

2. Freeze and distribute the form

Freeze and distribute the form.

Optionally Import Alarms

One way to quickly create alarms is by generating them offline and importing them.

1. Download the alarm creator

Down alarm_creator.xls. Follow the instructions on the first sheet to create and export your alarms.

2. Import Alarms

In the PFM, go to the Data menu and click "View, Edit, Download". Click on the database icon in the to view and edit the PFTimeAlarm data. Click the Import button, select the alarms CSV that you generated offline, and click import

Optionally Import Alarms

One way to quickly create alarms is via ODBC connection. Contact Pendragon for a secure remote login to update alarms remotely.

Alarm Form Structure

PFTimeAlarm

This form defines the individual alarms. A standard android notification will trigger with the alarm and its respective reminders (if not dismissed). When the user clicks it, it will open Pendragon Forms, save any active record. If a targetform is set, then it will open a new record on the target form.

Records

This form will contain one record for each alarm and its respective reminders and other settings.

Fields

alarmtime (date time field)
reminder1 (date time field—leave null if no reminder)
reminder2 (date time field—leave null if no second reminder)
title (textfield—alarm message title)
message (textfield—alarm message)
vibrate (YES/NO) sound (YES/NO)
targetform (textfield—form name of target form)

PFTimeAlarmLog (Optional)

A record will be created in this form when the user clicks on an alarm notification.

Fields

alarmtime (date time field)
notificationtime (date time field)
responsetime (date time field)

Related Subjects

EMA Study Template

Use this EMA template to get started. This includes alarms, creating alarms on the fly, branching, protecting access to alarm based surveys.

Branching

Navigate the user through forms based on their selections.

Custom Menus

Provide users with a custom menu after their sync.

Scripting Insert Records

Insert records into other forms based on their responses.

Get Started With Your Free 14 day Trial!

Start Free Trial