This document describes how to use the iHealth Device SDK to accomplish the major operation: Connection Device, Online Measurement, Offline Measurement and iHealth Device Management.
If you want to use the iHealth Device, you must first call authentication method, can call after certification by iHealth relevant methods of the device.
Authentication method:
-(void)commandSDKUserValidation:(HealthUser *)tempUser UserDeviceAccess:(DisposeSDKUserDeviceAccess)userDeviceAccess UserValidationSuccess:(DisposeSDKUserValidationSuccess)userValidationSuccess UserValidationReturn:(DisposeSDKUserValidationReturn)userValidationReturn DisposeErrorBlock:(DisposeSDKUserValidationErrorBlock)disposeValidationErrorBlock
BP:
iHealth BP3 iHealth BP3L iHealth BP5 iHealth BP5S iHealth BP7 iHealth BP7S iHealth Continua BP iHealth KN550BT iHealth ABI iHealth ABPM
HS:
iHealth HS3 iHealth HS4 iHealth HS4S(Same with HS4) iHealth HS5 iHealth HS6
AM:
iHealth AM3 iHealth AM3S iHealth AM4
BG:
iHealth BG1 iHealth BG3 iHealth BG5 iHealth BG5L
PO:
iHealth PO3
AM3 AM3S AM4 HS4 HS4S BP5S ABPM
1、Import the following iHealthSDK files:
BP:
BPHeader.h、 BPMacroFile.h、BPCommandCache.h、BPController.h、BPDevice.h、 BP3.h、 BP3Controller.h、BP3L.h、 BP3LController.h、 BP5.h、BP5Controller.h、BP5S.h、BP5SController.h、 BP7.h、 BP7Controller.h、BP7S.h、BP7SController.h、 ABI.h, ABIController.h、BPContinua.h、BPContinuaController.h、ABPM.h、ABPMController.h、KN550BT.h、KN550BTController.h
HS:
HSHeader.h、HSMacroFile.h、HS3.h、HS3Controller.h、HS4.h、HS4Controller.h、 HS5.h、HS5Controller.h、iHealthHS6.h
AM:
AMHeader.h、AMMacroFile.h、AM3.h、 AM3Controller.h、AM3S_V2.h、AM3SController_V2、AM4.h、AM4Controller.h、
PO:
POHeader.h、POMacroFile.h、PO3.h、PO3Controller.h
BG:
BGHeader.h、BGMacroFile.h、BGCommandCache.h、BGController.h、BGDevice.h、BG5.h、BG5Controller.h、BG1.h、BG1Controller.h、BG3.h、BG3Controller.h、BG5L.h、BG5LController.h
Common:
HealthUser.h、ConnectDeviceController.h、ScanDeviceController.h、HealthHeader.h
Update:
SDKUpdateDevice.h
Authentication:
IHSDKCloudUser.h
Library: iHealthSDK2.1.a
supports iOS 8.0 and above.
2、Frameworks
3、Configuration
Add 2 new Item in ‘Supported external accessory protocols’: com.jiuan.BPV20, com.jiuan.P930, com.jiuan.BPV21,com.jiuan.BGV30,com.jiuan.BGV31,com.ihealth.sc221 
Add 1 new Item in ‘Required background modes’: App communicates with an accessory、 App communicates using CoreBluetooth
- Operation procedure for BP3.
Reference BP5
-
Operation procedure for BP5.
a) Register plug-in device info:
BP5ConnectNoti
;b) Initialize controller classes:
shareBP5Controller];```
c) Access control class instance after receive `BP5ConnectNoti`:
```NSArray *bpDeviceArray = [controller
getAllCurrentBP5Instace];```
``` BP5 *bpInstance = [bpDeviceArray objectAtIndex: i];```
d) Using ‘bpInstance’ call communication module of the device
-
Operation procedure for BP7.
Reference BP5
-
Operation procedure for ABI.
For ABI Mesure(both arm and leg)
a) Register plug-in device info:
ABIConnectNoti
; b) Initializedcontrollerclass:shareABIController];``` c) Access controller class instance after receive `ABIConnectNoti`: ```ABI *bpInstance = [controller getCurrentABIInstace];``` d) Using ‘bpInstance’ call communication module of the device. For Arm Mesure(arm only) a) Register plug-in device info: `ArmConnectNoti`; b) Initializedcontrollerclass: ```ABIController *controller = [ABIController shareABIController];``` c) Access controller class instance after receive ArmConnectNoti: ```ABI *bpInstance = [controller getCurrentArmInstance];``` d) Using ‘bpInstance’ call communication module of the device.
-
Operation procedure for BP3L.
a) Register plug-in device info:
BP3LDiscover
;b) Start scan BP3L
[[ScanDeviceController commandGetInstance]commandScanDeviceType:HealthDeviceType_BP3L]
c) Register plug-in device info:
BP3LConnectFailed
、BP3LConnectNoti
、BP3LDisConnectNoti
;d) Connect BP3L after receive
BP3LDiscover
[[ScanDeviceController commandGetInstance]commandStopScanDeviceType:HealthDeviceType_BP3L]
[[ConnectDeviceController commandGetInstance]commandContectDeviceWithDeviceType:HealthDeviceType_BP3L andSerialNub:serialNub]
e) Access control class instance after receive
BP3LConnectNoti
:
shareBP3LController];
NSArray *bpDeviceArray = [controller
getAllCurrentBP3LInstace]; ```
```BP3L *bpInstance = [bpDeviceArray objectAtIndex: i];```
f) Using ‘bpInstance’ call communication module of the device
-
Operation procedure for BP7S、KN550BT、KD926、
Reference BP3L
-
Operation procedure for HS3.
Reference BP5
-
Operation procedure for HS4.
Reference BP3L
-
Operation procedure for HS5.
Reference BP5
-
Operation procedure for AM3.
```Reference BP3L```
- Operation procedure for AM3S.
```Reference BP3L```
- Operation procedure for AM4.
```Reference BP3L```
- Operation procedure for PO3.
```Reference BP3L```
- Operation procedure for BG1.
a) Initialization for BG1 (connected BG via sound jack)
```[[BG1Controller shareBG1Controller]initBGAudioModule];```
b) Access control class instance after receive BG1ConnectNoti
:
BG1 *bgInstance = [[BG1Controller shareBG1Controller] getCurrentBG1Instance];
c) Using ‘bgInstance’ to call the connection and BG test module of the device. BG test function must be called after the block of connection return.
- Operation procedure for BG5.
```Reference BP5```
OLD:
-(void)commandStartMeasureWithUser:(NSString *)userID clientID:(NSString *)clientID clientSecret:(NSString *)clientSecret Authentication:(BlockUserAuthentication)disposeAuthenticationBlock pressure:(BlockPressure)pressure xiaoboWithHeart:(BlockXioaboWithHeart)xiaobo xiaoboNoHeart:(BlockXioaboNoHeart)xiaoboNoHeart result:(BlockMesureResult)result errorBlock:(BlockError)error;
NEW:
-(void)commandStartMeasureWithZeroingState:(BlockZero)blockZeroState pressure:(BlockPressure)pressure waveletWithHeartbeat:(BlockWavelet)blockWaveletWithHeartbeat waveletWithoutHeartbeat:(BlockWavelet)blockWaveletWithoutHeartbeat result:(BlockMeasureResult)result errorBlock:(BlockError)error;
OLD:
-(void)commandStartMeasureWithUser:(NSString *)userID clientID:(NSString *)clientID clientSecret:(NSString *)clientSecret Authentication:(BlockUserAuthentication)disposeAuthenticationBlock pressure:(BlockPressure)pressure xiaoboWithHeart:(BlockXioaboWithHeart)xiaobo xiaoboNoHeart:(BlockXioaboNoHeart)xiaoboNoHeart result:(BlockMesureResult)result errorBlock:(BlockError)error;
NEW:
-(void)commandStartMeasureWithZeroingState:(BlockZero)blockZeroState pressure:(BlockPressure)pressure waveletWithHeartbeat:(BlockWavelet)blockWaveletWithHeartbeat waveletWithoutHeartbeat:(BlockWavelet)blockWaveletWithoutHeartbeat result:(BlockMeasureResult)result errorBlock:(BlockError)error;
OLD:
-(void)commandStartMeasureWithUser:(NSString *)userID clientID:(NSString *)clientID clientSecret:(NSString *)clientSecret Authentication:(BlockUserAuthentication)disposeAuthenticationBlock pressure:(BlockPressure)pressure xiaoboWithHeart:(BlockXioaboWithHeart)xiaobo xiaoboNoHeart:(BlockXioaboNoHeart)xiaoboNoHeart result:(BlockMesureResult)result errorBlock:(BlockError)error;
NEW:
-(void)commandStartMeasureWithZeroingState:(BlockZero)blockZeroState pressure:(BlockPressure)pressure waveletWithHeartbeat:(BlockWavelet)blockWaveletWithHeartbeat waveletWithoutHeartbeat:(BlockWavelet)blockWaveletWithoutHeartbeat result:(BlockMeasureResult)result errorBlock:(BlockError)error;
OLD:
-(void)commandStartMeasure:(BlockPressure)pressure xiaoboWithHeart:(BlockXioaboWithHeart)xiaobo xiaoboNoHeart:(BlockXioaboNoHeart)xiaoboNoHeart result:(BlockMesureResult)result errorBlock:(BlockError)error;
NEW:
-(void)commandStartMeasureWithZeroingState:(BlockZero)blockZeroState pressure:(BlockPressure)pressure waveletWithHeartbeat:(BlockWavelet)blockWaveletWithHeartbeat waveletWithoutHeartbeat:(BlockWavelet)blockWaveletWithoutHeartbeat result:(BlockMeasureResult)result errorBlock:(BlockError)error;
- add ZeroingState callback, it will continuous send NO when zeroing, and when zeroing ready, it will send YES;
- change wavelet name from
xiaobo
towavelet
- change
BlockXioaboWithHeart
andBlockXioaboNoHeart
block type toBlockWavelet
OLD:
typedef void(^BlockStopSuccess)();
typedef void(^BlockSetUnitSuccess)();
typedef void(^BlockSetAngleSuccess)();
typedef void(^BlockSetPresureTargetSuccess)();
NEW:
typedef void(^BlockSuccess)();
Change all success type blocks into a uniform one