User Guide
Security: Confidential Version: V1.0
Scope: Customer Status: Released
AL
TI
EN
HC03 Flutter SDK API Guide
D
FI
N
O
C
File No. LT-SW-24062401 Type RD
P
Written: Chenzq Date: 2024-6-24
O
Check: Yangxd Date: 2024-6-24
KT
Approval: Tangzp Date: 2024-6-24
N
LI
Linktop Technology Co., Ltd
2024-06-24 All rights reserved Page 1 of 11
User Guide
◼ Records
Version Date Remarks
V1.0 2024.06.24 First version
AL
TI
EN
D
FI
N
O
C
P
O
KT
N
LI
2024-06-24 All rights reserved Page 2 of 11
User Guide
◼ Table of Contents
1. INTRODUCTION .................................................................................................................................................... 4
1.1. ENGINEERING DEVELOPMENT DESCRIPTION ....................................................................................................... 4
1.2. INTEGRATION STEPS............................................................................................................................................ 4
1.2.1. Android ...................................................................................................................................................... 4
1.2.2. iOS ............................................................................................................................................................. 4
2. API DESCRIPTION ................................................................................................................................................. 5
AL
2.1. FUNCTION DESCRIPTION ..................................................................................................................................... 5
2.2. FLOW CHART ...................................................................................................................................................... 5
2.3. EXTERNAL INTERFACE ........................................................................................................................................ 5
2.3.1. Initialization ............................................................................................................................................... 5
TI
2.3.2. Start ............................................................................................................................................................ 6
2.3.3. Stop ............................................................................................................................................................ 6
2.3.4. Callback ..................................................................................................................................................... 7
EN
2.3.5. ECG ........................................................................................................................................................... 7
2.3.6. Blood oxygen .............................................................................................................................................. 8
2.3.7. Glucose ...................................................................................................................................................... 9
2.3.8. Blood pressure ......................................................................................................................................... 10
D
2.3.9. Battery ...................................................................................................................................................... 10
2.3.10. Body temperature ..................................................................................................................................... 11
FI
N
O
C
P
O
KT
N
LI
2024-06-24 All rights reserved Page 3 of 11
User Guide
1. Introduction
1.1. Engineering Development Description
1. Bluetooth outsourcing, unpacking, and data processing are encapsulated in the lib/src/core directory, and
the external API is in the hc03_sdk_impl.dart file
2. The Bluetooth library is encapsulated in the lib/src/bluetooth directory, and the external API is in the
AL
bluetool_manager.dart file
3. The call to the function is located in the lib/src/pages_data/health_data.dart file.
1.2. Integration Steps
TI
EN
1.2.1. Android
1. Porting the jar package of Android/app/libs/[Link] and the Java files in the
D
Android/app/src/main/Java/com/ecg folder, as well as the So library and
Android/app/src/main/kotlin/com/example/smart_flutter/[Link] files in the
Android/app/src/main/jniLibs folder to your project FI
N
2. Initialize EcgPlugin in the configureFlutterEngine method of MainActivity in your project Android. Please
refer to Android/app/src/main/kotlin/com/example/smart_flutter/[Link]
O
Remember to add permission references to Android/app/src/main/[Link] in
[Link]
C
Please refer to the android/app/[Link] file for the dependency on NskAlgoSdk. jar and the setting of
the jniLibs path that needs to be added in the android/app/[Link] file.
P
O
1.2.2. iOS
KT
1. Porting the files and .a library from the ios/Runner/libNSKAlgoSDECG folder, as well as the
N
ios/Runner/SDK Health Monitor.h and ios/Runner/SDK Health Monitor. m, to your project.
Note that the .a static library needs to be added in Target ->Build Phases ->Link Binary With Libraries
LI
in xcode, and then in Target ->Build Setting ->Other Link Flags, add - all'load (the .a library is located in
libNSKAlgoSDECG).
2. To initialize SDKHealthMonitor in ios/Runner/AppDelegate.h and ios/Runner/AppDelegate.m, please refer
to the demo for ios/Runner/AppDelegate. h and ios/Runner/AppDelegate.m.
2024-06-24 All rights reserved Page 4 of 11
User Guide
2. API Description
2.1. Function Description
SDK establishes a connection with the device through BLE. You can easily communicate with the device
through the SDK and extract services such as electrocardiogram, blood oxygen, and body temperature data
provided by the device.
AL
2.2. Flow Chart
TI
EN
D
FI
N
O
C
P
O
KT
N
LI
2.3. External Interface
2.3.1. Initialization
Initialize where you need to use interfaces
Hc03Sdk sdk=[Link]();
2024-06-24 All rights reserved Page 5 of 11
User Guide
2.3.2. Start
1) Function
startDetect(Detection detection);
Call startDetect to start the test interface after Bluetooth connection
2) Parameter
AL
➢ [Link]: Temperature
➢ [Link]: Blood oxygen
➢ [Link]: Electrocardiogram
TI
➢ [Link]: Blood pressure
EN
➢ [Link]: Battery
➢ [Link]: Blood sugar
3) Sample Code
D
FI
N
O
2.3.3. Stop
C
1) Function
P
stopDetect(Detection detection);
Call stopDetect to stop the testing interface
O
2) Parameter
KT
➢ [Link]: temperature
➢ [Link]: Blood oxygen
➢
N
[Link]: Electrocardiogram
➢ [Link]: Blood pressure
LI
➢ [Link]: Blood sugar
3) Sample Code
2024-06-24 All rights reserved Page 6 of 11
User Guide
2.3.4. Callback
1) Function
parseData(data);
2) Parameter
data: Bluetooth callback data
AL
3) Sample Code
TI
EN
D
2.3.5. ECG
1) Function
FI
N
getEcgData;
O
2) Callback data type
➢ Wave: Data used for drawing waveforms
C
➢ HR: Heart rate data
➢ Mood Index: Mood Index
P
1-20: chill
O
21-40: relax
41-60: balance
KT
61-80: excitation
81-100: Excitement/Anxiety/Excitement
N
➢ RR: Peak to peak value
➢ HRV: Heart rate variability
LI
➢ RESPIRATORY RATE:Respiratory rate
➢ touch: Finger detection
3) Sample Code
2024-06-24 All rights reserved Page 7 of 11
User Guide
AL
TI
EN
D
FI
N
2.3.6. Blood oxygen
O
C
1) Function
getBloodOxygen;
P
2) Callback data type
O
➢ BloodOxygenData:
bloodOxygen: Blood oxygen
KT
heartRate: heart rate
➢ FingerDetection: Finger detection
N
➢ BloodOxygenWaveData: Draw waveform data
3) Sample Code
LI
2024-06-24 All rights reserved Page 8 of 11
User Guide
AL
TI
EN
D
FI
N
O
2.3.7. Glucose
C
1) Function
P
getBloodGlucoseData;
2) Callback data type
O
➢ BloodGlucoseSendData:Data to be sent to the device
KT
➢ BloodGlucosePaperState: Blood glucose test strip status information during the measurement process
➢ BloodGlucosePaperData: Blood glucose data
N
3) Sample Code
LI
2024-06-24 All rights reserved Page 9 of 11
User Guide
2.3.8. Blood pressure
1) Function:
getBloodPressureData;
2) Callback data type:
➢ BloodPressureSendData:Data to be sent to the device
AL
➢ BloodPressureProcess: Display the process of blood pressure measurement
➢ BloodPressureResult: Blood pressure data
TI
ps: systolic pressure
pd: diastolic pressure
EN
hr: heart rate
3) Sample Code:
D
FI
N
O
C
P
O
KT
2.3.9. Battery
1) Function:
N
getBattery;
LI
2) Callback data type:
➢ BatteryLevelData: Battery percentage data
➢ BatteryChargingStatus: Battery charging status
3) Sample Code:
2024-06-24 All rights reserved Page 10 of 11
User Guide
AL
2.3.10. Body temperature
TI
1) Function:
EN
getTemperature;
2) Callback data type:
TemperatureData: Body temperature data
D
3) Sample Code:
FI
N
O
C
P
O
KT
N
LI
2024-06-24 All rights reserved Page 11 of 11