This is an Android application for recording, displaying, and uploading physiological signals from SmartCare.
There are two types of SmartCare oximeters to be aware of:
- Silver Label Type – Devices with a silver information sticker on the back are only compatible with older Android versions (up to Android 10 or below). These devices may experience connection issues on newer Android versions.
- Printed Label Type – Devices with printed information directly on the back are fully compatible with all Android versions and do not have such limitations.
Before using the application, please check your device’s Android version and grant the required permissions according to the version’s security requirements to ensure stable operation.
-
RecordActivity.java- Main activity for recording and displaying oximeter data- Manages Bluetooth connection to pulse oximeters
- Displays real-time PPG waveforms using AndroidPlot
- Shows heart rate, SpO₂, and battery status
- Handles patient information and data recording sessions
-
FileManagerActivity.java- Manages recorded data files- Displays CSV files and uploaded files
- Handles file upload operations
- Provides file management interface
OximeterDataService.java- Foreground service for continuous data collection- Runs in background to ensure uninterrupted recording
- Writes oximeter data to CSV files
- Manages data buffering and file chunking
OximeterDataBuffer.java- Buffers incoming oximeter dataOximeterDataWriterFunctions.java- Handles CSV file writing operations- Creates new recording sessions
- Writes data points to CSV files
- Manages file chunking based on time intervals
-
FileUploader.java- Handles file upload to server- Uploads CSV files and annotation data
- Manages upload progress and callbacks
- Configurable server URL
-
FileLogger.java- Application logging system- Logs app events to file for debugging
- Provides different log levels (INFO, WARNING, ERROR)
-
PatientInfoPopup.java- Patient information entry dialog- Collects patient/research codes
- Validates and saves patient identifiers
-
ChunkFileConfigPopup.java- Configuration for file chunking- Enables/disables file splitting
- Sets time interval for chunks
-
ShowAnnotate.java- Annotation menu system- Allows marking events during recording
- Manages annotation history
AnnotationHistory.java- Displays annotation historyCodeHistoryAdapter.java- Adapter for annotation history listAnnotationUploadScheduler.java- Schedules daily annotation uploadsUploadAnnotationWorker.java- Background worker for uploading annotations
BluetoothAutoConnector.java- Automatic Bluetooth device discovery and connection
- Auto-discovery of SmartCare oximeters
- Manual device pairing and connection
- Supports up to 2 saved devices
- Auto-reconnection capability
- Real-time PPG waveform display
- Records: SpO₂, heart rate, plethysmography, perfusion index, battery level
- Continuous CSV file generation
- Optional file chunking by time interval
- Uploads recorded CSV files to server
- Batch upload of annotation data
- Progress tracking and error handling
- Patient/research code entry
- Code validation and formatting
- Persistent storage of patient information
- Event marking during recording (e.g., cough, movement)
- Annotation history viewing
- Foreground service ensures recording continues
- Battery optimization exemption requested
- Handles service disconnection recovery
activity_main.xml- Main recording interfaceactivity_file_manager.xml- File management screenpatient_info_popup.xml- Patient info dialog- Various item layouts for lists and dialogs
- UI backgrounds, borders, buttons
- Icons for menu items and actions
strings.xml- Text resourcesstyles.xml- UI stylingdimens.xml- Dimensions
- Bluetooth (SCAN, CONNECT)
- Location (for Bluetooth scanning)
- Storage (for file operations)
- Notifications (foreground service)
- Battery optimization exemption
- AndroidPlot - Chart/graph library for waveform display
- jDSP - Signal processing (detrending)
- SmartCare Oximetry Library (
scolib-2.0.0.aar) - Oximeter connection management
- Open the project in Android Studio
- Sync Gradle dependencies
- Connect an Android device or start an emulator
- Run the application