Holy crap, thanks for posting this - was going out of my mind trying to figure out why I couldn't get two pending intents to fire off. Thanks Rob
On Sat, Feb 21, 2009 at 4:10 AM, Juan David Trujillo C. < jdavidandr...@gmail.com> wrote: > > In case this is useful for someone: > When you are programming several AlarmManagers, you have to differ > them using a setData parameter: > > intent.setData((Uri.parse("custom://"+SystemClock.elapsedRealtime > ()))); > long firstAlarmMillis = getFirstTimeAlarm(mYear, mMonth, > mDay, > mHour, mMinute); > intent.putExtra("timeInMillis", firstAlarmMillis); > PendingIntent sender = PendingIntent.getBroadcast > (getApplicationContext(), 0, intent, 0); > //Log.d("tiven", "despues de la > alarma"+firstAlarmMillis); > AlarmManager am = (AlarmManager)getSystemService > (ALARM_SERVICE); > am.set(AlarmManager.RTC_WAKEUP, firstAlarmMillis, sender); > > You have to set a parameter to differ intents, or else you won't be > able to hable them in a broadcast receiver. > > Best regards, > > Juan > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---