Get BT Pairing status
Function table
__IDO_FUNCTABLE__.funcTable38Model.bleAndBtVersion
BT Pairing status model description
- IDOGetBtPairStateModel
Parameter | Description | Notes |
---|---|---|
btConnectState | btconnect state | bool |
btPairState | bt pair state | bool |
a2dpConnectState | a2dp connect state | bool |
hfpConnectState | hfp connect state | bool |
Command code
Objc:
[IDOFoundationCommand getBtPairStateCommand:^(int errorCode, IDOGetBtPairStateModel * _Nullable data) {
if (errorCode == 0) {
//get success
}else if (errorCode == 6) {
//device not supported
}else {
//get failed
}
}];
Swift:
IDOFoundationCommand.getBtPairStateCommand { (errorCode, model) in
if errorCode == 0 {
//get success
}else if errorCode == 6 {
//device not supported
}else {
//get failed.
}
};