Package 

Class ShortcutBadger

    • Method Detail

      • applyCount

         static boolean applyCount(Context context, int badgeCount)

        Tries to update the notification count

        Parameters:
        context - Caller context
        badgeCount - Desired badge count
      • applyCountOrThrow

         static void applyCountOrThrow(Context context, int badgeCount)

        Tries to update the notification count, throw a ShortcutBadgeException if it fails

        Parameters:
        context - Caller context
        badgeCount - Desired badge count
      • removeCount

         static boolean removeCount(Context context)

        Tries to remove the notification count

        Parameters:
        context - Caller context
      • isBadgeCounterSupported

         static boolean isBadgeCounterSupported(Context context)

        Whether this platform launcher supports shortcut badges. Doing this check causes the sideeffect of resetting the counter if it's supported, so this method should be followed bya call that actually sets the counter to the desired value, if the counter is supported.