V3 Get Package Name
Function: getNotifyIconAdaptive
Flutter Example:
/// Get event number for obtaining app package name
getPackName(
evtBase: _VBusEvtBase.base_app_get,
evtType: _VBusEvtType.tran_json_get_app_pack_name
),
/// Get app package name
libManager.send(evt: CmdEvtType.getPackName, json: jsonEncode(json));
JSON Fields Sent by the App:
Field Name | Field Type | Field Description |
---|---|---|
operat_flag | int | 0: Get all 1: Get incremental data |
last_id | int | Only effective when operat_flag equal to get incremental data. Need to pass the ID returned last time to continue getting incremental data |
Example:
{
"operat_flag": 0,
"last_id": 0
}
JSON Fields Received by the App:
Field Name | Field Type | Field Description |
---|---|---|
version | int | Protocol library version number |
icon_width | int | Width(pixel size) |
icon_height | int | Height(pixel size) |
format | int | Color format |
block_size | int | Compression block size |
pack_name_num | int | Number of package names |
package_num | int | Total number of package name details |
items | array | App package name details Collection of item_id, evt_type, need_sync_icon, msg_cout, pack_name_len, pack_name_array |
Field Name | Field Type | Field Description |
---|---|---|
item_id | int | ID assigned to each package name, starting from 0, used later to get incremental data |
evt_type | int | Event type |
need_sync_icon | int | Need to update icon data: 0: No update 1: Update icon only 2: Update app name only 3: Update both icon and app name |
msg_cout | int | Number of times this message was received |
pack_name_len | int | Package name length, maximum 50 bytes |
pack_name_array | char [] | Package name |
Example:
{
"version": 0,
"icon_width": 200,
"icon_height": 120,
"format": 133,
"block_size": 1024,
"pack_name_num": 0,
"package_num": 0,
"items": null
}