capacitor-plugin-ihealth 1.1.2 → 1.1.3
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.
- package/README.md +6 -6
- package/android/build.gradle +23 -2
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/assets/libiHealth.so +0 -0
- package/android/src/main/assets/libs/arm64-v8a/libBodyfat_SDK.so +0 -0
- package/android/src/main/assets/libs/arm64-v8a/libECGOffline.so +0 -0
- package/android/src/main/assets/libs/arm64-v8a/libECGOnline.so +0 -0
- package/android/src/main/assets/libs/arm64-v8a/libVeryFitMulti.so +0 -0
- package/android/src/main/assets/libs/arm64-v8a/libiHealth.so +0 -0
- package/android/src/main/java/com/managemyhealth/plugins/ihealth/BaseApplication.java +51 -0
- package/android/src/main/java/com/managemyhealth/plugins/ihealth/DeviceCharacteristic.java +49 -0
- package/android/src/main/java/com/managemyhealth/plugins/ihealth/ihealthPlugin.java +1966 -3
- package/android/src/main/libiHealth.so +0 -0
- package/dist/docs.json +3 -3
- package/dist/esm/definitions.d.ts +1 -1
- package/dist/esm/definitions.js.map +1 -1
- package/ios/Plugin/ihealthPlugin.swift +9 -2
- package/package.json +1 -1
Binary file
|
package/dist/docs.json
CHANGED
@@ -131,12 +131,12 @@
|
|
131
131
|
},
|
132
132
|
{
|
133
133
|
"name": "addListener",
|
134
|
-
"signature": "(...args: [eventName: \"OnlineDeviceData\", listenerFunc: (info: any) => void] | [eventName: \"error\", listenerFunc: (info: any) => void] | [eventName: \"deviceDatafound\", listenerFunc: (info: any) => void] | [eventName: \"StartMeasurementFinished\", listenerFunc: (info: any) => void] | [eventName: \"dataNotFound\", listenerFunc: (info: any) => void] | [eventName: \"deviceConnectFail\", listenerFunc: (info: any) => void] | [eventName: \"deviceDisconnect\", listenerFunc: (info: any) => void] | [eventName: \"deviceDiscover\", listenerFunc: (info: any) => void] | [eventName: \"deviceConnect\", listenerFunc: (info: any) => void]) => Promise<PluginListenerHandle> & PluginListenerHandle",
|
134
|
+
"signature": "(...args: [eventName: \"OnlineDeviceData\", listenerFunc: (info: any) => void] | [eventName: \"toast\", listenerFunc: (info: any) => void] | [eventName: \"error\", listenerFunc: (info: any) => void] | [eventName: \"deviceDatafound\", listenerFunc: (info: any) => void] | [eventName: \"StartMeasurementFinished\", listenerFunc: (info: any) => void] | [eventName: \"dataNotFound\", listenerFunc: (info: any) => void] | [eventName: \"deviceConnectFail\", listenerFunc: (info: any) => void] | [eventName: \"deviceDisconnect\", listenerFunc: (info: any) => void] | [eventName: \"deviceDiscover\", listenerFunc: (info: any) => void] | [eventName: \"deviceConnect\", listenerFunc: (info: any) => void]) => Promise<PluginListenerHandle> & PluginListenerHandle",
|
135
135
|
"parameters": [
|
136
136
|
{
|
137
137
|
"name": "args",
|
138
138
|
"docs": "",
|
139
|
-
"type": "[eventName: 'OnlineDeviceData', listenerFunc: (info: any) => void] | [eventName: 'error', listenerFunc: (info: any) => void] | [eventName: 'deviceDatafound', listenerFunc: (info: any) => void] | [eventName: 'StartMeasurementFinished', listenerFunc: (info: any) => void] | [eventName: 'dataNotFound', listenerFunc: (info: any) => void] | [eventName: 'deviceConnectFail', listenerFunc: (info: any) => void] | [eventName: 'deviceDisconnect', listenerFunc: (info: any) => void] | [eventName: 'deviceDiscover', listenerFunc: (info: any) => void] | [eventName: 'deviceConnect', listenerFunc: (info: any) => void]"
|
139
|
+
"type": "[eventName: 'OnlineDeviceData', listenerFunc: (info: any) => void] | [eventName: 'toast', listenerFunc: (info: any) => void] | [eventName: 'error', listenerFunc: (info: any) => void] | [eventName: 'deviceDatafound', listenerFunc: (info: any) => void] | [eventName: 'StartMeasurementFinished', listenerFunc: (info: any) => void] | [eventName: 'dataNotFound', listenerFunc: (info: any) => void] | [eventName: 'deviceConnectFail', listenerFunc: (info: any) => void] | [eventName: 'deviceDisconnect', listenerFunc: (info: any) => void] | [eventName: 'deviceDiscover', listenerFunc: (info: any) => void] | [eventName: 'deviceConnect', listenerFunc: (info: any) => void]"
|
140
140
|
}
|
141
141
|
],
|
142
142
|
"returns": "Promise<PluginListenerHandle> & PluginListenerHandle",
|
@@ -145,7 +145,7 @@
|
|
145
145
|
"complexTypes": [
|
146
146
|
"PluginListenerHandle"
|
147
147
|
],
|
148
|
-
"slug": "addlistenereventname-onlinedevicedata-listenerfunc-info-any--void--eventname-error-listenerfunc-info-any--void--eventname-devicedatafound-listenerfunc-info-any--void--eventname-startmeasurementfinished-listenerfunc-info-any--void--eventname-datanotfound-listenerfunc-info-any--void--eventname-deviceconnectfail-listenerfunc-info-any--void--eventname-devicedisconnect-listenerfunc-info-any--void--eventname-devicediscover-listenerfunc-info-any--void--eventname-deviceconnect-listenerfunc-info-any--void"
|
148
|
+
"slug": "addlistenereventname-onlinedevicedata-listenerfunc-info-any--void--eventname-toast-listenerfunc-info-any--void--eventname-error-listenerfunc-info-any--void--eventname-devicedatafound-listenerfunc-info-any--void--eventname-startmeasurementfinished-listenerfunc-info-any--void--eventname-datanotfound-listenerfunc-info-any--void--eventname-deviceconnectfail-listenerfunc-info-any--void--eventname-devicedisconnect-listenerfunc-info-any--void--eventname-devicediscover-listenerfunc-info-any--void--eventname-deviceconnect-listenerfunc-info-any--void"
|
149
149
|
}
|
150
150
|
],
|
151
151
|
"properties": []
|
@@ -28,5 +28,5 @@ export interface ihealthPlugin {
|
|
28
28
|
startBP5SMeasurement(): Promise<{
|
29
29
|
value: any;
|
30
30
|
}>;
|
31
|
-
addListener(...args: [eventName: 'OnlineDeviceData', listenerFunc: (info: any) => void] | [eventName: 'error', listenerFunc: (info: any) => void] | [eventName: 'deviceDatafound', listenerFunc: (info: any) => void] | [eventName: 'StartMeasurementFinished', listenerFunc: (info: any) => void] | [eventName: 'dataNotFound', listenerFunc: (info: any) => void] | [eventName: 'deviceConnectFail', listenerFunc: (info: any) => void] | [eventName: 'deviceDisconnect', listenerFunc: (info: any) => void] | [eventName: 'deviceDiscover', listenerFunc: (info: any) => void] | [eventName: 'deviceConnect', listenerFunc: (info: any) => void]): Promise<PluginListenerHandle> & PluginListenerHandle;
|
31
|
+
addListener(...args: [eventName: 'OnlineDeviceData', listenerFunc: (info: any) => void] | [eventName: 'toast', listenerFunc: (info: any) => void] | [eventName: 'error', listenerFunc: (info: any) => void] | [eventName: 'deviceDatafound', listenerFunc: (info: any) => void] | [eventName: 'StartMeasurementFinished', listenerFunc: (info: any) => void] | [eventName: 'dataNotFound', listenerFunc: (info: any) => void] | [eventName: 'deviceConnectFail', listenerFunc: (info: any) => void] | [eventName: 'deviceDisconnect', listenerFunc: (info: any) => void] | [eventName: 'deviceDiscover', listenerFunc: (info: any) => void] | [eventName: 'deviceConnect', listenerFunc: (info: any) => void]): Promise<PluginListenerHandle> & PluginListenerHandle;
|
32
32
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import { PluginListenerHandle } from \"@capacitor/core\";\n\nexport interface ihealthPlugin {\n authoriseiHealthSdk(): Promise<{ value: any }>;\n isBluetoothEnabled(): Promise<{ value: any }>;\n\tinitialiseCentralManager(): Promise<{ value: any }>;\n scanDiscover(options: Object): Promise<{ value: any }>;\n\tconnectDevice(options: Object): Promise<any>;\n getConnectedDeviceInstance(options: Object): Promise<{ value: any }>;\n\tdisconnectDevice(): Promise<{ value: any }>;\n deleteDeviceData(): Promise<{ value: any }>;\n getDeviceOfflineData(): Promise<{ value: any }>;\n startBP5SMeasurement(): Promise<{ value: any }>;\n addListener(...args: [eventName: 'OnlineDeviceData', listenerFunc: (info: any) => void] |[eventName: 'error', listenerFunc: (info: any) => void] | [eventName: 'deviceDatafound', listenerFunc: (info: any) => void] | [eventName: 'StartMeasurementFinished', listenerFunc: (info: any) => void] | [eventName: 'dataNotFound', listenerFunc: (info: any) => void]|[eventName: 'deviceConnectFail', listenerFunc: (info: any) => void] | [eventName: 'deviceDisconnect', listenerFunc: (info: any) => void] | [eventName: 'deviceDiscover', listenerFunc: (info: any) => void] | [eventName: 'deviceConnect', listenerFunc: (info: any) => void]): Promise<PluginListenerHandle> & PluginListenerHandle;\n}\n"]}
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import { PluginListenerHandle } from \"@capacitor/core\";\n\nexport interface ihealthPlugin {\n authoriseiHealthSdk(): Promise<{ value: any }>;\n isBluetoothEnabled(): Promise<{ value: any }>;\n\tinitialiseCentralManager(): Promise<{ value: any }>;\n scanDiscover(options: Object): Promise<{ value: any }>;\n\tconnectDevice(options: Object): Promise<any>;\n getConnectedDeviceInstance(options: Object): Promise<{ value: any }>;\n\tdisconnectDevice(): Promise<{ value: any }>;\n deleteDeviceData(): Promise<{ value: any }>;\n getDeviceOfflineData(): Promise<{ value: any }>;\n startBP5SMeasurement(): Promise<{ value: any }>;\n addListener(...args: [eventName: 'OnlineDeviceData', listenerFunc: (info: any) => void] | [eventName: 'toast', listenerFunc: (info: any) => void] |[eventName: 'error', listenerFunc: (info: any) => void] | [eventName: 'deviceDatafound', listenerFunc: (info: any) => void] | [eventName: 'StartMeasurementFinished', listenerFunc: (info: any) => void] | [eventName: 'dataNotFound', listenerFunc: (info: any) => void]|[eventName: 'deviceConnectFail', listenerFunc: (info: any) => void] | [eventName: 'deviceDisconnect', listenerFunc: (info: any) => void] | [eventName: 'deviceDiscover', listenerFunc: (info: any) => void] | [eventName: 'deviceConnect', listenerFunc: (info: any) => void]): Promise<PluginListenerHandle> & PluginListenerHandle;\n}\n"]}
|
@@ -1213,7 +1213,8 @@ timerCount = timerCount+1
|
|
1213
1213
|
let userData = ["result": bp5sData, "deviceModel": "BP5S", "deviceMacAddress": self.deviceMacAddress,"isFromLive":true] as [String : Any]
|
1214
1214
|
self.notifyListeners("deviceDatafound", data: userData)
|
1215
1215
|
}, errorBlock: { err in
|
1216
|
-
|
1216
|
+
let userData = ["error": "BP5S measurement stopped."] as [String : Any]
|
1217
|
+
self.notifyListeners("error", data: userData)
|
1217
1218
|
})
|
1218
1219
|
}, errorBlock: { error in
|
1219
1220
|
|
@@ -1485,11 +1486,17 @@ timerCount = timerCount+1
|
|
1485
1486
|
}
|
1486
1487
|
|
1487
1488
|
public func device(_ device: BG5S!, stripStateDidUpdate state: BG5SStripState) {
|
1488
|
-
print(" BG5S >> stripStateDidUpdate")
|
1489
|
+
print(" BG5S >> stripStateDidUpdate \(state.rawValue)")
|
1490
|
+
if(state.rawValue == 0){
|
1491
|
+
self.notifyListeners("toast", data: ["message":"strip inserted"])
|
1492
|
+
}else if(state.rawValue == 1){
|
1493
|
+
self.notifyListeners("toast", data: ["message":"strip removed"])
|
1494
|
+
}
|
1489
1495
|
}
|
1490
1496
|
|
1491
1497
|
public func deviceDropBlood(_ device: BG5S!) {
|
1492
1498
|
print(" BG5S >> deviceDropBlood")
|
1499
|
+
self.notifyListeners("toast", data: ["message":"blood drop received"])
|
1493
1500
|
}
|
1494
1501
|
|
1495
1502
|
public func device(_ device: BG5S!, dataID: String!, measureReult result: Int) {
|