V3 Synchronization Protocol Bluetooth Call Common Contacts
Menu: setSyncContact, reminderCallContact 【getSupportSetGetEmergencyContactV3】
Flutter Example:
/// Synchronize common contacts event number
setSyncContact(
evtBase: _VBusEvtBase.base_app_set,
evtType: _VBusEvtType.tran_json_sync_contact
),
/// Synchronize common contacts
libManager.send(evt: CmdEvtType.setSyncContact, json: jsonEncode(json));
JSON fields issued by the App:
Field Name | Field Type | Field Description |
---|---|---|
version | int | Protocol library version number |
operat | int | Operation 0: invalid 1: set contacts 2: query contacts 3: set emergency contacts (requires support for getSupportSetGetEmergencyContactV3 in the menu)4: query emergency contacts (requires support for getSupportSetGetEmergencyContactV3 in the menu)5: Query the firmware to initiate the sos information.(requires support for supportGetSosCallRecord in the menu) |
items_num | int | The maximum number of contacts details supported by default is 10. You can retrieve the maximum number of common contacts supported by the device by using the event ID getSupportMaxSetItemsNum and reading the field contact_max_set_num . |
items | array | Contact details collection ofphone and name |
Field Name | Field Type | Field Description |
---|---|---|
phone | char [] | Contact phone number content, maximum of 14 bytes + '\0' line break |
name | char [] | Contact name content, maximum of 31 bytes + '\0' line break |
Example:
{
"version": 0,
"operat": 1,
"items_num": 1,
"items": [
{
"phone": "13310214520",
"name": "张三"
}
]
}
JSON fields received by the App:
Field Name | Field Type | Field Description |
---|---|---|
version | int | Protocol library version number |
err_code | int | Error code, 0 for success, non-zero for error code |
operat | int | Operation 0: invalid 1: set 2: query 3: set emergency contacts (requires support for getSupportSetGetEmergencyContactV3 in the menu)4: query emergency contacts (requires support for getSupportSetGetEmergencyContactV3 in the menu)5: Query the firmware to initiate the sos information.(requires support for supportGetSosCallRecord in the menu) |
items_num | int | Number of contact details, maximum of 10 The maximum number of contacts details supported by default is 10. You can retrieve the maximum number of common contacts supported by the device by using the event ID getSupportMaxSetItemsNum and reading the field contact_max_set_num .Valid only when the operation code (operat) is 2 or 4 |
items | array | Contact details collection of phone and name Valid only when the operation code (operat) is 2 or 4 |
sos_time_num | int | The number of firmware sos initiation times, up to 20 Operation code (operat) is query (5) valid |
time | collection | Contact details year & month & day & hour & minute & second collection Operation code (operat) is query (5) valid |
Field Name | Field Type | Field Description |
---|---|---|
phone | char [] | Contact phone number content, maximum of 14 bytes + '\0' line break Valid only when the operation code (operat) is 2 or 4 |
name | char [] | Contact name content, maximum of 31 bytes + '\0' line break Valid only when the operation code (operat) is 2 or 4 |
Field name | Field type | Field description |
---|---|---|
year | int | sos Trigger time-year Operation code (operat) is query (5) valid |
month | int | sos Trigger time-month Operation code (operat) is query (5) valid |
day | int | sos Trigger time-day Operation code (operat) is query (5) valid |
hour | int | sos Trigger time-hour Operation code (operat) is query (5) valid |
minute | int | sos Trigger time-minute Operation code (operat) is query (5) valid |
second | int | sos Trigger time-second Operation code (operat) is query (5) valid |
Example:
{
"version": 0,
"err_code": 0,
"operat": 1,
"items_num": 0,
"items":null,
"sos_time_num":0,
"time":null
}