ios
Gene Doe is available only on Apple’s iOS for iPhones, iPods, and iPads to take full advantage of all that the 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, Gene Doe has full access to all system functionality that Apple makes available through their software development kits. Listed below 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 maintenance of user state at all times. Therefore, internet connection is not required for proper app functioning once the user has enrolled in a study. Attempts will be made to upload collected data any time 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 app’s background programming without direct user interaction with the app, as they are run periodically for a brief duration from the background. Gene Doe uses Background App Refresh 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. An activity log summarizing session and data upload statuses is updated on the platform dashboard for easy monitoring of participant compliance and connection reliability with REDCap. Finally, local notifications are scheduled for upcoming patient events on a rolling basis.
c) Local Notifications
Local notifications are used to alert the study participant of waiting scheduled sessions and consist of banner messages, unique alarm sounds, and device vibrations when sound is turned off. Notifications appear on all patient devices, including the Apple Watch, and are scheduled locally within the app to support proper program functionality in the absence of an internet connection. Since Apple sets a 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 up to three times, with repeat alerts after a defined time interval.
d) Push Notifications
Initiated by the investigator team using the Advocate 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”]
Captured 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 enabling the user to dictate responses.
g) Sensors
iOS devices come equipped with sensors 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 and with whom location data is shared, and users are reminded periodically of an app’s access to location data, requiring further authorization over time.
(1) Peripheral Devices
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
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 to form a digital “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, a website, or scanning a QR code in their physical environment. Gene Doe uses App Clips to provide users further details for a specific study they are seeing promoted, as well as 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.