You need to use different id's for the pending intents. Something like
this:

                Intent intent = new Intent(load.this,
AlarmReceiver.class);
                final int _id = (int) System.currentTimeMillis();
                PendingIntent appIntent =
                        PendingIntent.getBroadcast(this, _id, intent,
PendingIntent.FLAG_ONE_SHOT);

Using the system time should be a unique identifier for every pending
intent you fire.


On Jun 29, 11:21 pm, Pankaj Deshpande <[email protected]>
wrote:
> Hi everybody,
>  I want to set two alarms through my application. I have two controls
> to set them. But when I set one alarm and then another, then the last
> alarm set works only and previous get cancelled. What is the way to
> keep their pending intents separate? How can I do this?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to