Set Notification Center Switch
Menu: ancs(c library jsonid SDK to be supplemented)【setMsgAllSwitch】
Flutter Example:
/// Set Notification Center Event
setNotificationCenter(
evtBase: _VBusEvtBase.base_app_set,
evtType: _VBusEvtType.app_set_notice),
/// Set Notification Center
libManager.send(evt: CmdEvtType.setNotificationCenter, json: jsonEncode(json));
JSON Fields Sent by the App:
Field Name | Field Type | Field Description |
---|---|---|
notify_switch | int | Notification reminder switch 0: BLE switch off(Reserved,invalid function) 1: BLE switch on(Initiate pairing for IOS only) 2: Set sub-switches 3: BT switch on (switch) 4: BLE and BT on (switch) |
call_switch | int | Incoming call reminder switch 1: On 0: Off |
notify_item1 | int | Sub-app switch 1, each bit represents an app |
notify_item2 | int | Sub-app switch 2, each bit represents an app |
call_delay | int | Incoming call reminder delay, in seconds |
notify_item3 | int | Sub-app switch 3, each bit represents an app |
notify_item4 | int | Sub-app switch 4, each bit represents an app |
notify_item5 | int | Sub-app switch 5, each bit represents an app |
notify_item6 | int | Sub-app switch 6, each bit represents an app |
notify_item7 | int | Sub-app switch 7, each bit represents an app |
notify_item8 | int | Sub-app switch 8, each bit represents an app |
notify_item9 | int | Sub-app switch 9, each bit represents an app |
notify_item10 | int | Sub-app switch 10, each bit represents an app |
msg_all_switch | int | Message app switch On: 1 Off: 0 |
notify_item11 | int | Sub-app switch 11, each bit represents an app |
notify_item12 | int | Sub-app switch 12, each bit represents an app |
Example:
{
"call_delay" : 0,
"call_switch" : 1,
"msg_all_switch" : 0,
"notify_item1" : 0,
"notify_item2" : 0,
"notify_item3" : 0,
"notify_item4" : 0,
"notify_item5" : 0,
"notify_item6" : 0,
"notify_item7" : 0,
"notify_item8" : 0,
"notify_item9" : 0,
"notify_item10" : 0,
"notify_item11" : 0,
"notify_item12" : 0,
"notify_switch" : 1
}
JSON Fields Received by the App:
Field Name | Field Type | Field Description |
---|---|---|
notify_switch | int | Notification reminder switch |
status_code | int | Status 0: Unknown timeout 1: Success 2: Failed (canceled) 3: Firmware pairing timeout |
err_code | int | 0: Success Non-zero: Failure |
Example:
{
"notify_switch" : 1,
"status_code" : 1,
"err_code" : 0
}