android - 状态栏上的通知小图标为每个通知创建
问题描述
我正在创建一个通知
mNotifyBuilder.setContentTitle(envelope.getSubjectWithDefault(context.getString(R.string.no_subject)))
.setTicker(sybject)
.setSmallIcon(icon)
.setContentInfo(name)
.setDeleteIntent(PendingIntent.getBroadcast(context, (int) id, deleteIntent, PendingIntent.FLAG_CANCEL_CURRENT))
.setContentIntent(PendingIntent.getActivity(context, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT))
.setAutoCancel(true)
.setNumber(count)
.setGroup(group)
.addAction(reply)
.addAction(cancel, context.getString(R.string.delete), dismiss)
.setPriority(NotificationCompat.PRIORITY_MAX)
.setStyle(new NotificationCompat.BigTextStyle()
.bigText(text))
.setContentText(text);
String noti = Context.NOTIFICATION_SERVICE;
NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(noti);
mNotificationManager.notify((int) id, notify);
但有些手机会在状态栏上为每次推送创建自己的小图标。我如何才能找到或可以更改代码以修复此类通知以使其正常工作?
解决方案
推荐阅读
- javascript - 反应组件的滑块及其在一页上的重用
- c# - Rollback() 但查询仍然获得新值
- python - 我的视频模型测试程序没有显示任何内容
- reactjs - 在移动设备上的 React 中仅纵向视图?
- html - 为什么我不能在 css 中对图像进行过渡?
- c# - 如何在 Unity 中将 Canvas 中的对象调用到 Prefabs 中的角色对象?
- javascript - 以波形格式排序,但从特定数字开始
- javascript - JS 范围/关闭问题
- angular - 在 Angular 中处理来自 httpClient 的数据
- swift - SwiftUI:pushViewController:animated:在现有过渡或演示发生时调用...