Interface PolarOnlineStreamingApi
-
- All Implemented Interfaces:
public interface PolarOnlineStreamingApiOnline streaming API.
Online streaming makes it possible to stream live online data from Polar device.
Requires features FEATURE_POLAR_ONLINE_STREAMING or PolarBleApi.PolarBleSdkFeature.FEATURE_HR
Note, online streaming is supported by VeritySense, H10 and OH1 devices
-
-
Method Summary
Modifier and Type Method Description abstract Set<PolarBleApi.PolarDeviceDataType>getAvailableOnlineStreamDataTypes(String identifier)Get the data types available in this device for online streaming. abstract Set<PolarBleApi.PolarDeviceDataType>getAvailableHRServiceDataTypes(String identifier)Find out if the HR service is available in the device. abstract PolarSensorSettingrequestStreamSettings(String identifier, PolarBleApi.PolarDeviceDataType feature)Request the online stream settings available in current operation mode. abstract PolarSensorSettingrequestFullStreamSettings(String identifier, PolarBleApi.PolarDeviceDataType feature)Request the settings available in the device. abstract Flow<PolarHrData>startHrStreaming(String identifier)Start heart rate stream. abstract UnitstopHrStreaming(String identifier)Stops heart rate stream. abstract Flow<PolarEcgData>startEcgStreaming(String identifier, PolarSensorSetting sensorSetting)Start the ECG (Electrocardiography) stream. abstract Flow<PolarAccelerometerData>startAccStreaming(String identifier, PolarSensorSetting sensorSetting)Start ACC (Accelerometer) stream. abstract Flow<PolarPpgData>startPpgStreaming(String identifier, PolarSensorSetting sensorSetting)Start optical sensor PPG (Photoplethysmography) stream. abstract Flow<PolarPpiData>startPpiStreaming(String identifier)Start PPI (Pulse to Pulse interval) stream. abstract Flow<PolarMagnetometerData>startMagnetometerStreaming(String identifier, PolarSensorSetting sensorSetting)Start magnetometer stream. abstract Flow<PolarGyroData>startGyroStreaming(String identifier, PolarSensorSetting sensorSetting)Start Gyro stream. abstract Flow<PolarPressureData>startPressureStreaming(String identifier, PolarSensorSetting sensorSetting)Start Pressure data stream. abstract Flow<PolarLocationData>startLocationStreaming(String identifier, PolarSensorSetting sensorSetting)Start Location data stream. abstract Flow<PolarTemperatureData>startTemperatureStreaming(String identifier, PolarSensorSetting sensorSetting)Start Temperature data stream. abstract Flow<PolarTemperatureData>startSkinTemperatureStreaming(String identifier, PolarSensorSetting sensorSetting)Start Skin Temperature data stream. abstract Unit)>stopStreaming(String identifier, <Error class: unknown class> type)-
-
Method Detail
-
getAvailableOnlineStreamDataTypes
abstract Set<PolarBleApi.PolarDeviceDataType> getAvailableOnlineStreamDataTypes(String identifier)
Get the data types available in this device for online streaming.
- Parameters:
identifier- Polar device id found printed on the sensor/device or bt address- Returns:
the set of available online streaming data types in this device
-
getAvailableHRServiceDataTypes
abstract Set<PolarBleApi.PolarDeviceDataType> getAvailableHRServiceDataTypes(String identifier)
Find out if the HR service is available in the device. Use this API method in a case where the device does not support Polar Measurement Data service. In such a case using getAvailableOnlineStreamDataTypes will return error; use this method instead.
Requires feature PolarBleApi.PolarBleSdkFeature.FEATURE_HR
- Parameters:
identifier- Polar device id found printed on the sensor/device or bt address- Returns:
the set with HR service, if available
-
requestStreamSettings
abstract PolarSensorSetting requestStreamSettings(String identifier, PolarBleApi.PolarDeviceDataType feature)
Request the online stream settings available in current operation mode. This request shall be used before the stream is started to decide currently available settings. The available settings depend on the state of the device. For example, if any stream(s) or optical heart rate measurement is already enabled, then the device may limit the offer of possible settings for other stream feature.
- Parameters:
identifier- polar device id or bt addressfeature- the stream feature of interest- Returns:
PolarSensorSetting with available settings
-
requestFullStreamSettings
abstract PolarSensorSetting requestFullStreamSettings(String identifier, PolarBleApi.PolarDeviceDataType feature)
Request the settings available in the device. The request returns all capabilities of the requested streaming feature not limited by the current operation mode.
Note, This request is supported only by Polar Verity Sense (starting from firmware 1.1.5)
- Parameters:
identifier- polar device id or bt addressfeature- the stream feature of interest- Returns:
PolarSensorSetting with full settings
-
startHrStreaming
abstract Flow<PolarHrData> startHrStreaming(String identifier)
Start heart rate stream. Heart rate stream is stopped if the connection is closed, error occurs or flow collection is cancelled.
Requires feature PolarBleApi.PolarBleSdkFeature.FEATURE_HR
- Parameters:
identifier- Polar device id found printed on the sensor/device or bt address- Returns:
Flow of PolarHrData
-
stopHrStreaming
abstract Unit stopHrStreaming(String identifier)
Stops heart rate stream.
- Parameters:
identifier- Polar device id found printed on the sensor/device or bt address
-
startEcgStreaming
abstract Flow<PolarEcgData> startEcgStreaming(String identifier, PolarSensorSetting sensorSetting)
Start the ECG (Electrocardiography) stream. ECG stream is stopped if the connection is closed, error occurs or flow collection is cancelled.
- Parameters:
identifier- Polar device id found printed on the sensor/device or bt addresssensorSetting- settings to be used to start streaming- Returns:
Flow of PolarEcgData
-
startAccStreaming
abstract Flow<PolarAccelerometerData> startAccStreaming(String identifier, PolarSensorSetting sensorSetting)
Start ACC (Accelerometer) stream. ACC stream is stopped if the connection is closed, error occurs or flow collection is cancelled.
- Parameters:
identifier- Polar device id found printed on the sensor/device or bt addresssensorSetting- settings to be used to start streaming- Returns:
Flow of PolarAccelerometerData
-
startPpgStreaming
abstract Flow<PolarPpgData> startPpgStreaming(String identifier, PolarSensorSetting sensorSetting)
Start optical sensor PPG (Photoplethysmography) stream. PPG stream is stopped if the connection is closed, error occurs or flow collection is cancelled.
- Parameters:
identifier- Polar device id found printed on the sensor/device or bt addresssensorSetting- settings to be used to start streaming- Returns:
Flow of PolarPpgData
-
startPpiStreaming
abstract Flow<PolarPpiData> startPpiStreaming(String identifier)
Start PPI (Pulse to Pulse interval) stream. PPI stream is stopped if the connection is closed, error occurs or flow collection is cancelled. Notice that there is a delay before PPI data stream starts.
- Parameters:
identifier- Polar device id found printed on the sensor/device or bt address- Returns:
Flow of PolarPpiData
-
startMagnetometerStreaming
abstract Flow<PolarMagnetometerData> startMagnetometerStreaming(String identifier, PolarSensorSetting sensorSetting)
Start magnetometer stream. Magnetometer stream is stopped if the connection is closed, error occurs or flow collection is cancelled.
- Parameters:
identifier- Polar device id found printed on the sensor/device or bt addresssensorSetting- settings to be used to start streaming- Returns:
Flow of PolarMagnetometerData
-
startGyroStreaming
abstract Flow<PolarGyroData> startGyroStreaming(String identifier, PolarSensorSetting sensorSetting)
Start Gyro stream. Gyro stream is stopped if the connection is closed, error occurs during start or flow collection is cancelled.
- Parameters:
identifier- Polar device id found printed on the sensor/device or bt addresssensorSetting- settings to be used to start streaming- Returns:
Flow of PolarGyroData
-
startPressureStreaming
abstract Flow<PolarPressureData> startPressureStreaming(String identifier, PolarSensorSetting sensorSetting)
Start Pressure data stream. Pressure data stream is stopped if the connection is closed, error occurs during start or flow collection is cancelled. Requires feature FEATURE_POLAR_ONLINE_STREAMING. Before starting the stream it is recommended to query the available settings using requestStreamSettings.
- Parameters:
identifier- Polar device id found printed on the sensor/device or bt addresssensorSetting- settings to be used to start streaming- Returns:
Flow of PolarPressureData
-
startLocationStreaming
abstract Flow<PolarLocationData> startLocationStreaming(String identifier, PolarSensorSetting sensorSetting)
Start Location data stream. Location stream is stopped if the connection is closed, error occurs during start or flow collection is cancelled. Requires feature FEATURE_POLAR_ONLINE_STREAMING. Before starting the stream it is recommended to query the available settings using requestStreamSettings.
- Parameters:
identifier- Polar device id found printed on the sensor/device or bt addresssensorSetting- settings to be used to start streaming- Returns:
Flow of PolarLocationData
-
startTemperatureStreaming
abstract Flow<PolarTemperatureData> startTemperatureStreaming(String identifier, PolarSensorSetting sensorSetting)
Start Temperature data stream. Temperature stream is stopped if the connection is closed, error occurs during start or flow collection is cancelled. Requires feature FEATURE_POLAR_ONLINE_STREAMING. Before starting the stream it is recommended to query the available settings using requestStreamSettings.
- Parameters:
identifier- Polar device id found printed on the sensor/device or bt addresssensorSetting- settings to be used to start streaming- Returns:
Flow of PolarTemperatureData
-
startSkinTemperatureStreaming
abstract Flow<PolarTemperatureData> startSkinTemperatureStreaming(String identifier, PolarSensorSetting sensorSetting)
Start Skin Temperature data stream. SkinTemperature stream is stopped if the connection is closed, error occurs during start or flow collection is cancelled. Requires feature FEATURE_POLAR_ONLINE_STREAMING. Before starting the stream it is recommended to query the available settings using requestStreamSettings.
- Parameters:
identifier- Polar device id found printed on the sensor/device or bt addresssensorSetting- settings to be used to start streaming- Returns:
Flow of PolarTemperatureData
-
stopStreaming
abstract Unit )>stopStreaming(String identifier, <Error class: unknown class> type)
-
-
-
-