Browse SDKs · HarmonyOS
Platform
SDKsHarmonyOSEnterprise

Get group application badge count

Query the entry badge count for group applications associated with the current account.

Copy

Queries the unread group application entry badge count for the current account.

Code example

import sdk, { GetGroupApplicationBadgeCountResp } from '@openimsdk/imsdk';

const response: GetGroupApplicationBadgeCountResp = await sdk.getGroupApplicationBadgeCount();
setGroupApplicationBadge(response.count);

Parameters

This method does not take any parameters.

Return value

Returns a Promise resolving to GetGroupApplicationBadgeCountResp:

PropertyTypeDescription
countnumberUnread badge count for group applications.

State changes after the call

Badge counts are maintained on the server and are distinct from the unhandled application count filtered by timestamp. Calling this method does not clear the badge. For subsequent badge count changes, listen to application badge events as described in Retrieve received group applications.