react-native-polar-bridge 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
package com.polarbridge
|
|
2
2
|
|
|
3
3
|
import android.util.Log
|
|
4
|
+
import androidx.annotation.Nullable
|
|
4
5
|
import com.facebook.react.bridge.*
|
|
5
6
|
import com.facebook.react.module.annotations.ReactModule
|
|
6
7
|
import com.polar.sdk.api.PolarBleApi
|
|
@@ -624,7 +625,8 @@ class PolarBridgeModule(reactContext: ReactApplicationContext) :
|
|
|
624
625
|
val timestampMs: Long
|
|
625
626
|
)
|
|
626
627
|
|
|
627
|
-
|
|
628
|
+
@ReactMethod
|
|
629
|
+
override fun fetchHrData(deviceId: String, @Nullable ms: Double?) {
|
|
628
630
|
Log.e(TAG, "Fetch Heart Data called on: $deviceId ")
|
|
629
631
|
val bufferMs: Long = if (ms != null && ms >= 0) {
|
|
630
632
|
ms.toLong()
|
|
@@ -735,7 +737,8 @@ class PolarBridgeModule(reactContext: ReactApplicationContext) :
|
|
|
735
737
|
}
|
|
736
738
|
}
|
|
737
739
|
|
|
738
|
-
|
|
740
|
+
@ReactMethod
|
|
741
|
+
override fun fetchAccData(deviceId: String, @Nullable ms: Double?) {
|
|
739
742
|
Log.e(TAG, "Fetch Accelerometer Data called on: $deviceId ")
|
|
740
743
|
val bufferMs: Long = if (ms != null && ms >= 0) {
|
|
741
744
|
ms.toLong()
|
|
@@ -796,7 +799,8 @@ class PolarBridgeModule(reactContext: ReactApplicationContext) :
|
|
|
796
799
|
}
|
|
797
800
|
}
|
|
798
801
|
|
|
799
|
-
|
|
802
|
+
@ReactMethod
|
|
803
|
+
override fun fetchGyrData(deviceId: String, @Nullable ms: Double?) {
|
|
800
804
|
Log.e(TAG, "Fetch Gyroscope Data called on: $deviceId ")
|
|
801
805
|
val bufferMs: Long = if (ms != null && ms >= 0) {
|
|
802
806
|
ms.toLong()
|
|
@@ -859,7 +863,8 @@ class PolarBridgeModule(reactContext: ReactApplicationContext) :
|
|
|
859
863
|
}
|
|
860
864
|
}
|
|
861
865
|
|
|
862
|
-
|
|
866
|
+
@ReactMethod
|
|
867
|
+
override fun fetchPpgData(deviceId: String, @Nullable ms: Double?) {
|
|
863
868
|
Log.e(TAG, "Fetch Photoplethysmograph Data called on: $deviceId ")
|
|
864
869
|
val bufferMs: Long = if (ms != null && ms >= 0) {
|
|
865
870
|
ms.toLong()
|