Name:
interface
Value:
Extend your Amplify Gen 2 app with AWS Blocks — self-contained backend capabilities you compose into your existing backend.

Choose your framework/language

Gen1 DocsLegacy

Page updated Jul 30, 2026

App badge count

Use getBadgeCount and setBadgeCount to read and update the number displayed on your application's icon. Call initializePushNotifications() first; see Push notifications.

Get the current badge count

import { getBadgeCount } from 'aws-amplify/push-notifications/customer-profiles';
const badgeCount = await getBadgeCount();

getBadgeCount resolves to the current count, or null on a platform that does not support badges.

Set the badge count

import { setBadgeCount } from 'aws-amplify/push-notifications/customer-profiles';
setBadgeCount(3);

Set the count to 0 to clear the badge from your application's icon:

import { setBadgeCount } from 'aws-amplify/push-notifications/customer-profiles';
setBadgeCount(0);

setBadgeCount is safe to call on a platform that does not support badges. The call is ignored rather than throwing an error.