Set notification status for third-party apps

Function table

__IDO_FUNCTABLE__.funcTable38Model.setNotifyAddAppName

Description of the notification state model for third-party applications

  • IDOSetAppNotifyStateItemModel
Parameter Description Remark
evtType Event type int(Firmware dynamically allocated,)
notifyState Notification status int (Allow notifications:1,Silent notification :2,Turn off notifications:3)
picFlag Image icon update status int (0: Invalid; 1:There are corresponding pictures to download;2:There is no corresponding picture)
Set ignore this property, only support get
packName Application package name str Set ignore this property, only support get
appName Application Name str Set ignore this property, only support acquisition
  • IDOSetV3NotifyStateModel
Parameter Description Remark
msgVersion Version No assignment needed for now
operat Operation 1:Increase; 2:Revise; 3:Get query
allSendNum Total number of packets sent int
nowSendIndex Currently sent sequence int
itemsNum Number of sets int
allOnOff All message notification switch bool
items Notification status collection array (IDOSetAppNotifyStateItemModel)

Command code

Objc:

IDOSetV3NotifyStateModel * model = [IDOSetV3NotifyStateModel currentModel];
[IDOFoundationCommand setMessageNoticeStateCommand:model
                                          callback:^(int errorCode) {
    if (errorCode == 0) {
       //Set successfully
    }else if (errorCode == 6) {
      //Device not supported
    }else {
      //Setup failed
    }
}];

Swift:

let model = IDOSetV3NotifyStateModel.current();
IDOFoundationCommand.setMessageNoticeState(model) { (errorCode) in
     if errorCode == 0 {
        //Set successfully
     }else if errorCode == 6{
        //Device does not support this method
     }else {
       //Wrong setting
     }
};
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 ""