Common control commands

Start BT device broadcast

Objc:

[IDOFoundationCommand openBtDeviceBroadcast];

Swift:

IDOFoundationCommand.openBtDeviceBroadcast()

Delete bracelet log

  • Parameter Description
parameter illustrate Remark
type Operation type 0x01:delete overheat log

Objc:


[IDOFoundationCommand clearLogCommandWithType:type 
                    callback:^(int errorCode,int state) {
   if (errorCode == 0) {
       //control successfully
    }else if (errorCode == 6) {
       //device not supported
    }else {
       //Control failed
    }
}];

Swift:

IDOFoundationCommand.clearLogCommand(withType: type) { (errorCode,state) in
    if errorCode == 0 {
        //control successfully
    }else if errorCode == 6 {
       //device not supported
    }else {
       //Control failed.                                                                                                                                                                                                                                        
    }            
};

Turn on music control

Objc:

[IDOFoundationCommand musicStartCommand:^(int errorCode) {
   if (errorCode == 0) {
       //control successfully
    }else if (errorCode == 6) {
       //device not supported
    }else {
       //Control failed
    }
}];

Swift:

IDOFoundationCommand.musicStart { (errorCode) in
   if errorCode == 0 {
        //control successfully
    }else if errorCode == 6 {
       //device not supported
    }else {
       //Control failed.                                                                                                                                                                                                                                        
    }    
}

Turn off music controls

Objc:

[IDOFoundationCommand musicStopCommand:^(int errorCode) {
   if (errorCode == 0) {
       //control successfully
    }else if (errorCode == 6) {
       //device not supported
    }else {
       //Control failed
    }
}];

Swift:

IDOFoundationCommand.musicStop{ (errorCode) in
   if errorCode == 0 {
        //control successfully
    }else if errorCode == 6 {
       //device not supported
    }else {
       //Control failed.                                                                                                                                                                                                                                        
    }    
}

Camera start control

Objc:

[IDOFoundationCommand cameraStartCommand:^(int errorCode) {
   if (errorCode == 0) {
       //control successfully
    }else if (errorCode == 6) {
       //device not supported
    }else {
       //Control failed
    }
}];

Swift:

IDOFoundationCommand.cameraStart{ (errorCode) in
   if errorCode == 0 {
        //control successfully
    }else if errorCode == 6 {
       //device not supported
    }else {
       //Control failed.                                                                                                                                                                                                                                        
    }    
}

Camera end control

Objc:

[IDOFoundationCommand cameraStopCommand:^(int errorCode) {
   if (errorCode == 0) {
       //control successfully
    }else if (errorCode == 6) {
       //device not supported
    }else {
       //Control failed
    }
}];

Swift:

IDOFoundationCommand.cameraStop{ (errorCode) in
   if errorCode == 0 {
        //control successfully
    }else if errorCode == 6 {
       //device not supported
    }else {
       //Control failed.                                                                                                                                                                                                                                        
    }    
}

start looking for device

Objc:

[IDOFoundationCommand findDeviceStartCommand:^(int errorCode) {
   if (errorCode == 0) {
       //control successfully
    }else if (errorCode == 6) {
       //device not supported
    }else {
       //Control failed
    }
}];

Swift:

IDOFoundationCommand.findDeviceStart { (errorCode) in
    if errorCode == 0 {
        //control successfully
    }else if errorCode == 6 {
       //device not supported
    }else {
       //Control failed.                                                                                                                                                                                                                                        
    }        
}

stop looking for devices

Objc:

[IDOFoundationCommand findDeviceStopCommand:^(int errorCode) {
   if (errorCode == 0) {
       //control successfully
    }else if (errorCode == 6) {
       //device not supported
    }else {
       //Control failed
    }
}];

Swift:

IDOFoundationCommand.findDeviceStop { (errorCode) in
    if errorCode == 0 {
        //control successfully
    }else if errorCode == 6 {
       //device not supported
    }else {
       //Control failed.                                                                                                                                                                                                                                        
    }        
}

stop looking for your phone

Objc:

[IDOFoundationCommand findPhoneStopCommand:^(int errorCode) {
   if (errorCode == 0) {
       //control successfully
    }else if (errorCode == 6) {
       //device not supported
    }else {
       //Control failed
    }
}];

Swift:

IDOFoundationCommand.findPhoneStop { (errorCode) in
    if errorCode == 0 {
        //control successfully
    }else if errorCode == 6 {
       //device not supported
    }else {
       //Control failed.                                                                                                                                                                                                                                        
    }        
}

Device restart control

Objc:

[IDOFoundationCommand setAppRebootCommand:^(int errorCode) {
   if (errorCode == 0) {
       //control successfully
    }else if (errorCode == 6) {
       //device not supported
    }else {
       //Control failed
    }
}];

Swift:

IDOFoundationCommand.setAppReboot{ (errorCode) in
   if errorCode == 0 {
        //control successfully
    }else if errorCode == 6 {
       //device not supported
    }else {
       //Control failed.                                                                                                                                                                                                                                        
    }    
}

factory reset

Objc:

[IDOFoundationCommand setRestoreFactoryCommand:^(int errorCode) {
   if (errorCode == 0) {
       //control successfully
    }else if (errorCode == 6) {
       //device not supported
    }else {
       //Control failed
    }
}];

Swift:

IDOFoundationCommand.setRestoreFactory{ (errorCode) in
   if errorCode == 0 {
        //control successfully
    }else if errorCode == 6 {
       //device not supported
    }else {
       //Control failed.                                                                                                                                                                                                                                        
    }    
}

Enter OTA upgrade mode

Objc:

[IDOFoundationCommand setOtaCommand:^(int errorCode) {
   if (errorCode == 0) {
       //control successfully
    }else if (errorCode == 6) {
       //device not supported
    }else {
       //Control failed
    }
}];

Swift:

IDOFoundationCommand.setOta{ (errorCode) in
   if errorCode == 0 {
        //control successfully
    }else if errorCode == 6 {
       //device not supported
    }else {
       //Control failed.                                                                                                                                                                                                                                        
    }    
}
Copyright © 2015-2020 IDO. All rights reserved. all right reserved,powered by GitbookModify Date: 2023-12-18 10:04:13

results matching ""

    No results matching ""