问题描述
8 android 后,我的应用程序图标出现在快捷方式上。
我知道这是专门添加的,以通知用户哪个应用程序创建了快捷方式。
这是当前用于创建图标的代码。
ShortcutManager shortcutManager = (ShortcutManager) context.getSystemService(Context.SHORTCUT_SERVICE);
BitmapDrawable bd = (BitmapDrawable) ic;
if (shortcutManager.isRequestPinShortcutSupported()) {
Intent shortcutInfoIntent = new Intent(context,MainActivity.class);
shortcutInfoIntent.setAction(Intent.ACTION_VIEW);
shortcutInfoIntent.putExtra("pckg",pck);
ShortcutInfo info = new ShortcutInfo.Builder(context,"iconId")
.setIcon(Icon.createWithBitmap(bd.getBitmap()))
.setShortLabel(label)
.setIntent(shortcutInfoIntent)
.build();
PendingIntent shortcutCallbackIntent = PendingIntent.getbroadcast(context,new Intent(context,MyReceiver.class),PendingIntent.FLAG_UPDATE_CURRENT);
shortcutManager.requestPinShortcut(info,shortcutCallbackIntent.getIntentSender());
}
我知道这是一个相当流行的问题,但没有人提供正常的解决方案。 但我需要以某种方式把它拿走
我确信这是可能的,因为它是在 x icon changer 中实现的,其中创建的图标没有这些徽章。
请写下您所有的解决方法
解决方法
我确信这是可能的,因为它是在 x icon changer 中实现的,其中创建的图标没有这些徽章。
他们为此使用应用小部件。请参阅 the Play Store listing that you linked to 中的“关于水印”。
请写下您所有的解决方法
编写一个应用小部件。