iOS

status/post is only available for the iOS platform, running on iPhones, iPods, and iPads. A major benefit of this approach is the opportunity to take full advantage of everything the iOS platform has to offer, rather than restricting functionality in pursuit of cross-platform compatibility. Application code is written in the native languages of iOS, Objective-C and Swift. As such, the app has full access to all system functionality that Apple makes available through their software development kits. Following are brief descriptions of some of the system features and Apple products used in our platform.

a)    Core Data
Our platform takes full advantage of Core Data for data persistence and to maintain user state at all times. An Internet connection is therefore not required for proper app functioning once the user has enrolled into a study. Attempts will be made to upload collected data any time an Internet connection is detected, and attempts will continue periodically until a success message is received from REDCap for each message posted to the API.

b)    Background App Refresh
This system feature allows app code to run in the background, without direct user interactions with the app. Apps registering for this feature are run periodically and for a brief duration from the background. Gene Doe uses these opportunities to upload collected data, update session statuses for those that were incomplete or missed and upload these statuses to REDCap. Passively collected HealthKit data is uploaded as well, allowing for frequent updates even in the absence of scheduled events. Messages from studies employing this feature are updated. An activity log summarizing session statuses and data upload status is updated on the platform dashboard for easy monitoring of participant compliance and connection reliability with REDCap. Local notifications are scheduled for upcoming scheduled events on a rolling basis.

c)    Local Notifications
Local notifications are used to alert the study participant of waiting scheduled sessions, and consist of a banner message, unique alarm sound, and device vibration when sound is turned off. Notifications will appear on the Apple Watch when present. Notifications are scheduled locally within the app, supporting proper app functionality in the absence of an Internet connection. Since Apple sets a rather small limit on the number of local notifications that can be scheduled at one time by an app, the Background App Refresh feature is used to schedule more notifications as old sessions are completed or expire. The app allows for multiple notifications to be scheduled for each session, such that users have the opportunity to “snooze” a notification for up to three times, with repeat alerts taking place after a defined time interval.

d)    Push Notifications
Initiated by the investigator team using the presents/with web application or automated analytics programs on the server, push notifications allow for ad-hoc interactions with the user in a variety of use-cases. The user has control over the alert mechanisms allowed. Messages are saved to the user’s in-box inside the app. Push notifications also appear on the Apple Watch when present and not prohibited by the user.

e)    Camera
The app can initialize the device camera and its display. Investigators can call for this at any point by setting the field datatype as “file upload” in REDCap, and placing the following command in the field annotation to capture an image or video from the front or back cameras: 

researchkit.imagecapture[“devicePosition”:”front”] 
researchkit.videocapture[“devicePosition”:”back”,”duration”:10”]

Capture media is uploaded using a process that can run from the background environment, allowing large files to upload to REDCap after the app is closed. 

f)    Microphone 
The app can initialize the device microphone to capture and upload audio. The microphone can also be used on text fields such that the user can dictate a response.

g)    Sensors
iOS Devices come equipped with a number of sensor devices that drive various functionality, and apps can gain access to their raw data output. 
(1)    Accelerometer captures three-axis acceleration and deceleration data. Data can be streamed or captured on demand. 
(2)    Gyroscope measures the rate at which a device rotates around a spatial axis. Data can be streamed or captured on demand.
(3)    Ambient light sensors can report on light in the physical environment.

h)    Location Services
A number of technologies are used together to determine a user’s geographic location. This includes accessing GPS coordinates, triangulation of cell phone and wifi radios, and motion tracking to extrapolate position following movement from a known location. A user’s position can be reported in a number of ways, including “visits” which are logged after the user spends a significant amount of time at a location, “significant changes” which are logged after a user moves a defined distance from a previously known location, and detailed logs of the user’s every move. Apple gives the user full control over when location data is shared, and users are reminded periodically of an app’s access to location data, requiring further authorization over time.

i)    Bluetooth
Bluetooth is a wireless technology standard used for exchanging data between fixed and mobile devices over short distances. 

(1)    Peripheral Devices can be connected to iOS devices using bluetooth to create a Personal Area Network. There are a wide variety of consumer health devices available that connect with the iPhone, and upload data collected by the peripheral to the Apple Health app. Uploaded data is then available to other apps on the iPhone when permission is granted by the user. Example devices include thermometers, pulse oximeters, blood pressure cuffs, glucometers, weight scales, and more. Investigators can request data from these devices with simple commands in REDCap field annotations: 

statusPost.healthKit.collector.start["type":"heartRate","frequency":"immediate"]

(2)    Beacons are small bluetooth radios that emit a periodic radio signal that is detected by nearby iOS devices. Beacons can be registered with the platform to track a user’s proximity to their geographic locations. Thresholds can be defined such that a user’s proximity is reported when the user is far (~30 meters), near (~10 meters), or immediately adjacent (< 20 centimeters) to the beacon. A group of beacons can be configured as a “geofence,” allowing the app to log a user’s entry and exit into the area.

j)    App Clips
Introduced with iOS 14, App Clips are a great way for users to quickly access and experience what an app has to offer. An App Clip represents a subset of app functionality, which is quickly and temporarily installed to the device by a user after clicking a hyperlink in a message or on a website or scanning a QR code in their physical environment. Gene Doe uses App Clips to provide users more details for a specific study they are seeing promoted, and the ability to download the full Gene Doe app and install the specific study when requested. 

k)    Widgets
Widgets allow users to keep timely information from their favorite apps available on the home page. Gene Doe uses widgets to show waiting sessions, quick access to on-demand sessions, and reports of the user’s compliance with scheduled sessions.

l)    QR Code reader
Quick Response (QR) codes can be scanned using the standard camera app. Our platform uses QR codes to direct users to more information for a study they are seeing promoted by downloading an App Clip. QR codes can also be used to restrict users, such that only users possessing either a default study QR code, or a code specific for the user, are allowed to enroll.