How 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
}
}
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.
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?
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.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With