我正在一个具有闹钟功能的android项目。多个全屏android的通知在同一时间不堆积
我为每个警报实例安排一个intentService(例如在下午9点触发),这个intentService构建通知并显示它。该通知包含一个fullScreenIntent,它按预期工作并启动该活动。我用下面的代码来做到这一点:
alarmActivityIntent = new Intent(this, AlarmActivity.class);
PendingIntent alarmActivityPendingIntent = PendingIntent.getActivity(this, alertSchedule.getIntentId(), alarmActivityIntent, PendingIntent.FLAG_CANCEL_CURRENT);
mBuilder.setFullScreenIntent(alarmActivityPendingIntent, true);
Notification mNotification = mBuilder.build();
mNotificationManager.notify(alertSchedule.getIntentId(), mNotification);
这时候如果有两个报警设置为火在特定时间的行为的变化只有一个闹钟设置火在特定的时间,但按预期工作。
我想要第一个fullScreenIntent开始其活动,然后当该活动结束时,显示下一个。我相信我想构建一个任务堆栈,并将这些警报意图推到它上面。然而,这对我来说是全新的。
是否可以对这些通知进行分组?