public final class ShortcutBadger
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
applyCount(android.content.Context context,
int badgeCount)
Tries to update the notification count
|
static void |
applyCountOrThrow(android.content.Context context,
int badgeCount)
Tries to update the notification count, throw a
ShortcutBadgeException if it fails |
static boolean |
removeCount(android.content.Context context)
Tries to remove the notification count
|
static void |
removeCountOrThrow(android.content.Context context)
Tries to remove the notification count, throw a
ShortcutBadgeException if it fails |
public static boolean applyCount(android.content.Context context,
int badgeCount)
context - Caller contextbadgeCount - Desired badge countpublic static void applyCountOrThrow(android.content.Context context,
int badgeCount)
throws ShortcutBadgeException
ShortcutBadgeException if it failscontext - Caller contextbadgeCount - Desired badge countShortcutBadgeExceptionpublic static boolean removeCount(android.content.Context context)
context - Caller contextpublic static void removeCountOrThrow(android.content.Context context)
throws ShortcutBadgeException
ShortcutBadgeException if it failscontext - Caller contextShortcutBadgeException