Android: launching multiple pending intentions at the same time using the Alarm Manager

In my application, I want to set some reminders. The code I used is as follows

    intnt = new Intent(appConxt, RempopActivity.class);
    intnt.putExtra("evinfo", evtime + " " + rem.getname()
            + "\n will start in " + remtime + " minutes");
    intnt.putExtra("evid", remcon.getEvid());
    intnt.putExtra("remId", remcon.getRemid());
    intnt.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);

    pendingIntent = PendingIntent.getActivity(appConxt, remcon.getRemid(), intnt,
            PendingIntent.FLAG_ONE_SHOT);
    am = (AlarmManager) appConxt.getSystemService(Context.ALARM_SERVICE);
    am.set(AlarmManager.RTC_WAKEUP, date.getTime() - (remtime * 60000),
            pendingIntent);

My question is even after a different requestCode , if more than one pending intention, starting from the same time, only one pending intention is displayed, the other pending intent will not come. How can I get all pending intentions.

+4
source share
1 answer

, RempopActivity "SingleInstance" , Launch SingleInstance . , , "".

0

Source: https://habr.com/ru/post/1524679/


All Articles