Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove the badge in app shortcut icon?

enter image description hereHow to remove the badge in app shortcut icon in android? When i create app shortcut programmatically, along with the icon specified for shortcut, app icon comes at the bottom-right corner of the icon. I don't want that badge.

Here is the code I used

    public static void addShortcutToHomeScreen(Context context)
{
    if (ShortcutManagerCompat.isRequestPinShortcutSupported(context))
    {
        ShortcutInfoCompat shortcutInfo = new ShortcutInfoCompat.Builder(context, "#1")
                .setIntent(new Intent(context, Splash.class).setAction(Intent.ACTION_MAIN)) // !!! intent's action must be set on oreo
                .setShortLabel("Test")
                .setIcon(IconCompat.createWithResource(context, R.drawable.logo))
                .build();
        ShortcutManagerCompat.requestPinShortcut(context, shortcutInfo, null);
    }
    else
    {
        // Shortcut is not supported by your launcher
    }
}
like image 352
Athira Avatar asked Jun 07 '18 12:06

Athira


People also ask

How do I get rid of app icon badges?

To Disable App Icon Badges Entirely If your Samsung Galaxy smartphone runs Android 11 or 12, open the Settings app and head into the "Notifications" menu. Then, tap "Advanced settings" and toggle off the "App icon badges" switch.

How do I get rid of the red number on my app icon Android?

You can search your Android Setting & search for “badge” or follow this hint: Open the Settings app and go to Apps & Notifications. Tap Notifications and enable or disable app icon badges by flipping the Allow icon badges switch on or off respectively. How do I get the little red number on my app icon?

What does badge app icon mean?

The app icon badge tells you there's a new notification or message waiting for you when you open the app, and the badge count tells you how many notifications there are.


1 Answers

No, there is no way. These additional options are added by launcher, not your app itself. Obviously, uninstall options will be not there if your app is not possible to be uninstalled (it's system app for example).

like image 97
Vishal2 vasundhara Avatar answered Oct 20 '22 16:10

Vishal2 vasundhara