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)
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)
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
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

Example:

{
    "version": 0,
    "err_code": 0,
    "operat": 1,
    "items_num": 0,
    "items": null
}
Copyright © 2023-2024 IDO. All rights reserved. all right reserved,powered by GitbookModify Date: 2026-04-07 16:03:47

results matching ""

    No results matching ""