Hi All,

i am creating more than one alarm but I always recieve only for the
last one which is raised. Can someone help me on this.. Following is
the code snippet.

 private void scheduleEventReminder(
        Context context, Calendar date, Long contactId, int eventType)
{
        Intent intent = new Intent(context,
EventReminderActivity.class);
        Uri uri = ContentUris.withAppendedId
(Identity.CONTENT_URI,contactId);
        Log.w(APP_TAG,"Content URI for id :" + contactId +  " : is :"
+ uri);

        //using uri as the unique value to differentiate between
alarms.
        intent.setData(uri);
        intent.putExtra("contactID", contactId);
        intent.putExtra("eventType", eventType);
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);


        PendingIntent sender = PendingIntent.getActivity(
                context, 0, intent,
PendingIntent.FLAG_CANCEL_CURRENT );
        AlarmManager am = (AlarmManager)context.getSystemService(
                android.content.Context.ALARM_SERVICE);
        am.set(AlarmManager.RTC, date.getTimeInMillis(), sender);

    }

>From the logs I can see that the uri value is unique each time the
scheduleEventReminder() API is called. Following is the log details
when I create three alarms for contact id 9,10 and 11.. But I only
recieve alarm for contact id 11.

Content URI for id :9 : is :content://all_contacts/identity/9
Content URI for id :10 : is :content://all_contacts/identity/10
Content URI for id :11 : is :content://all_contacts/identity/11


Also is it possible to create there alarms with the same time set but
with different data value?

Thanks,
Nik

--~--~---------~--~----~------------~-------~--~----~
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