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
}
}
First download an icon pack from PlayStore (loads to choose from). Go back to the screen with the offending icon. Press and hold icon you want to change (i.e. the one with the extra Chrome logo) and press edit. Press change icon. It will give you option to choose from the icon pack so press that. You will then have a large choice of icons so choose the one which best represents the current icon or choose something wildly different. Then tap OK. It will change the icon and have no extra badge.