NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

HifoCap: An Android App for Wearable Health Devices

Cheon Yoonsik, Ranga Rodrigo, Garcia JavierFrontiers in Artificial Intelligence and Applications 2017 · OpenAlex

Abstract

Android is becoming a platform for mobile health-care devices and apps. However, there are many challenges in developing soft real-time, health-care apps for non-dedicated mobile devices like smartphones and tablets. In this paper, we share our experiences in developing the HifoCap app, a mobile app for receiving electroencephalogram (EEG) wave samples from a wearable device, visualizing the received EEG samples, and transmitting them to a cloud storage server. The app is network and data-intensive. We describe the challenges we faced while developing the HifoCap app—e.g., ensuring the soft real-time requirement in the presence of uncertainty on the Android platform—along with our solutions to them. We measure both the time and space efficiency of our app and evaluate the effectiveness of our solutions quantitatively. We believe our solutions to be applicable to other soft real-time apps targeted for non-dedicated Android devices.

Introduction

Electroencephalograms (EEG) are critical diagnostic tools for brain disorders such as epilepsy. While these tests are traditionally conducted in clinical environments, there is a growing clinical interest in monitoring High-Frequency Oscillations (HFOs). These specific brain wave patterns serve as vital biomarkers for identifying epileptic tissue but are notoriously difficult to capture outside of controlled laboratory settings due to their high frequency.

The transition of such monitoring to mobile platforms presents a significant engineering challenge. Android, while ubiquitous, is not a real-time operating system. It is subject to "jitter" from background processes and periodic interruptions from automatic garbage collection (GC). For a medical application requiring the processing of 2,500 samples per second across 24 channels—a continuous 0.96 Mbps data stream—even minor system latencies can result in critical data loss or unusable display lag. The HifoCap project demonstrates that through rigorous software engineering and optimization, a standard smartphone can be transformed into a reliable, soft real-time medical monitor.

System Architecture

The HifoCap ecosystem consists of three primary components: the wearable EEG device, the Android smartphone application, and a cloud-based storage server. The data flow begins at the wearable device, which transmits raw EEG signals via Bluetooth to the smartphone. The app then processes this data for local storage and real-time visualization before eventually uploading the records to the cloud for long-term analysis.

High-level system architecture of the HifoCap ecosystem, showing the data flow from the wearable device to the mobile app and cloud server.

Implementation Strategies

To meet the "soft real-time" requirements on a non-dedicated platform, the researchers implemented a layered architecture consisting of a User Interface, Functional Core, and Storage/Network layer. Several key optimizations were employed to mitigate the limitations of the Android environment:

  • Aggressive Memory Management: To avoid the "stop-the-world" delays of Java's garbage collector, the team utilized Object Pooling and the Flyweight Pattern. By reusing memory and employing primitive short arrays instead of creating new objects for every EEG reading, the app significantly reduced memory pressure.
  • I/O Buffering: Custom buffers were implemented to accumulate EEG samples. This strategy reduced the frequency of expensive system calls required for writing to local storage or transmitting data to the cloud.
  • Selective Visualization (Downsampling): Recognizing that the human eye cannot perceive 2,500 updates per second, the app renders only a subset of samples (one out of every n) for the UI. This ensures a smooth visual experience while the background processes continue to log the full-resolution data.
  • Layered Software Design: The internal structure was strictly organized to separate data acquisition from user interaction, ensuring that UI lag does not interfere with data integrity.
The layered software architecture of the HifoCap app, detailing the separation between UI, Functional Core, and Storage/Network components.

Performance Evaluation

The system was evaluated using synthetic EEG data generated by a custom-built Android emulator designed to stress-test networking limits. Performance benchmarks involved 1,000 iterations of 10,000 EEG signal samples at varying rates (250 to 2,500 samples/sec).

Key Results

  • Latency: The end-to-end delay from the wearable device to the smartphone display averaged just 92 milliseconds, well within the threshold for effective live monitoring.
  • Throughput: The implementation of I/O buffering improved performance by 8% to 33%, depending on the sampling rate.
  • Memory Stability: Object pooling transformed the typical "sawtooth" memory allocation pattern into a stable flat line, preventing crashes and lag during extended monitoring sessions.
  • UI Efficiency: Downsampling for the UI provided a 257% improvement in performance. The study also noted that line graphs are significantly more resource-intensive (41% overhead) compared to tabular displays (4%).

Conclusion and Future Work

The HifoCap project successfully demonstrates that high-frequency medical data can be managed on consumer-grade mobile hardware. While the current study focused on technical performance, future work will address medical regulatory standards (such as FDA compliance) and power consumption analysis. Additionally, the team aims to integrate on-device machine learning for the automated, real-time detection of HFOs, moving the app from a visualization tool to an active diagnostic assistant.

Summary updated

BibTeX
@inproceedings{yoonsik2017hifocap,
  author = {Cheon Yoonsik and Ranga Rodrigo and Garcia Javier},
  title = {{HifoCap: An Android App for Wearable Health Devices}},
  booktitle = {Frontiers in Artificial Intelligence and Applications},
  year = {2017},
  doi = {10.3233/978-1-61499-773-3-178},
}
Figure