Skip to content

Oxygen Saturation

The Oxygen Saturation value is sent both as an instantaneous value during the measurement and as part of the final results.

The application can receive the Oxygen Saturation (SpO2) result by implementing VitalSignsListener:

Swift
func onVitalSign(vitalSign: VitalSign) {
    DispatchQueue.main.async {
        if (vitalSign.type == VitalSignTypes.oxygenSaturation) {
            if let oxygenSaturation = vitalSign as? VitalSignOxygenSaturation {
                print("Oxygen Saturation: \(oxygenSaturation.value)")
            }
        }
    }
}

func onFinalResults(results: VitalSignsResults) {
    DispatchQueue.main.async {
        if let oxygenSaturation = results.getResult(of: VitalSignTypes.oxygenSaturation) as? VitalSignOxygenSaturation {
            print("Oxygen Saturation: \(oxygenSaturation.value)")
        }
    }
}
Objective-C
- (void)onVitalSignWithVitalSign:(id<BIOVitalSign> _Nullable)vitalSign {
    dispatch_async(dispatch_get_main_queue(), ^{
        if (vitalSign.type == BIOVitalSignTypes.oxygenSaturation) {
            BIOVitalSignOxygenSaturation *oxygenSaturation = (BIOVitalSignOxygenSaturation *)vitalSign;
            if (oxygenSaturation != nil) {
                NSLog(@"Oxygen Saturation: %ld", (long)oxygenSaturation.value);
            }
        }
    });
}

- (void)onFinalResultsWithResults:(BIOVitalSignsResults *)results {
    dispatch_async(dispatch_get_main_queue(), ^{
        BIOVitalSignOxygenSaturation *oxygenSaturation = (BIOVitalSignOxygenSaturation *)[results getResultOf:BIOVitalSignTypes.oxygenSaturation];
        if (oxygenSaturation != nil) {
            NSLog(@"Oxygen Saturation: %ld", (long)oxygenSaturation.value);
        }
    });
}

For general information about vital signs see the Vital Signs and Health Indicators Information Document.

For a list of supported vital signs by platform and measurement mode (face/polar), along with their required measurement durations, refer to the Indicators Technical Information page.

Important

Note that vital signs are sent on a background thread. The application must switch to the UI thread in order to perform UI updates.