Re: [android-developers] Problem with timed notification

2011-04-21 Thread Brad Stintson
Thanks :) On Thu, Apr 21, 2011 at 6:54 PM, Kostya Vasilyev wrote: > You do that by using distinct notification IDs: > > mNotificationManager.notify(notificationId, notification); > > Where "notificaitonId" values should be unique. Perhaps using the same _id > as shown in your snippet. > > -- K

Re: [android-developers] Problem with timed notification

2011-04-21 Thread Kostya Vasilyev
You do that by using distinct notification IDs: mNotificationManager.notify(notificationId, notification); Where "notificaitonId" values should be unique. Perhaps using the same _id as shown in your snippet. -- Kostya 21.04.2011 16:31, Brad Stintson пишет: I use following snippet to set mul

Re: [android-developers] Problem with timed notification

2011-04-21 Thread Brad Stintson
I use following snippet to set multiple notifications. final int _id = (int) System.currentTimeMillis(); PendingIntent contentIntent = PendingIntent.getBroadcast(context, _id, intent, PendingIntent.FLAG_ONE_SHOT); But it replaces previous notification in the notification bar. How to add diffe

Re: [android-developers] Problem with timed notification

2011-04-21 Thread Kostya Vasilyev
Yeah, that's it. Android only maintains one instance of each pending intent, specifying FLAG_UPDATE_CURRENT lets you update that instance. The check to ensure there is "one instance of each" does not look at extras. -- Kostya 21.04.2011 13:47, Brad Stintson пишет: My problem is resolved. T

Re: [android-developers] Problem with timed notification

2011-04-21 Thread Brad Stintson
My problem is resolved. There was a problem in PendingIntent. I rectified that using PendingIntent contentIntent = PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); 2011/4/20 Brad Stintson > I did that. But on other side it receives null value. > > Intent act

Re: [android-developers] Problem with timed notification

2011-04-20 Thread Brad Stintson
I did that. But on other side it receives null value. Intent activate = new Intent(this, TimeAlarm.class); activate.putExtra("EVENT_TITLE", title); PendingIntent alarmIntent = PendingIntent.getBroadcast(this, 0, activate, 7); alarms = (AlarmManager)getSystemService(Context.ALARM

Re: [android-developers] Problem with timed notification

2011-04-20 Thread Kostya Vasilyev
Brad, You can put the extras in the Intent you create the PendingIntent from. 20.04.2011 19:16 пользователь "Brad Stintson" написал: > Thanks a tonne Kostya, that worked just fine. > > I have another query, I am unable to pass or retrieve an extra in a > BroadcastReceiver. How can I work that out

Re: [android-developers] Problem with timed notification

2011-04-20 Thread Brad Stintson
Thanks a tonne Kostya, that worked just fine. I have another query, I am unable to pass or retrieve an extra in a BroadcastReceiver. How can I work that out? On Wed, Apr 20, 2011 at 1:05 AM, Kostya Vasilyev wrote: > 19.04.2011 21:48, Brad Stintson пишет: > > When I set alarm for few mins from

Re: [android-developers] Problem with timed notification

2011-04-19 Thread Kostya Vasilyev
19.04.2011 21:48, Brad Stintson пишет: When I set alarm for few mins from current time, it shows this Elapsed realtime wakeup (now=1263900): ELAPSED_WAKEUP #0: Alarm{43d52750 type 2 android} type=2 when=112231046 repeatInterval=0 count=0 operation=PendingIntent{43c2e498: PendingIntent

Re: [android-developers] Problem with timed notification

2011-04-19 Thread Brad Stintson
When I set alarm for few mins from current time, it shows this Elapsed realtime wakeup (now=1263900): ELAPSED_WAKEUP #0: Alarm{43d52750 type 2 android} type=2 when=112231046 repeatInterval=0 count=0 operation=PendingIntent{43c2e498: PendingIntentRecord{43c5abb0 android broad castIntent}

Re: [android-developers] Problem with timed notification

2011-04-19 Thread Kostya Vasilyev
Brad, You can verify the alarm (as saved by Android) by typing "adb shell dumpsys alarm" in your development computer's command line window. Your alarm should be listed among others there, something like this: RTC_WAKEUP #2: Alarm{2b34f5f8 type 0 com.google.android.gsf} type=0 when=+26m

Re: [android-developers] Problem with timed notification

2011-04-19 Thread Mark Murphy
It would help if you could define "unable to set an alarm". On Tue, Apr 19, 2011 at 11:06 AM, Brad Stintson wrote: > I have set the date and time for the event in the interface using datepicker > and timepicker respectively. > These are stored in the database by converting them into long format.

[android-developers] Problem with timed notification

2011-04-19 Thread Brad Stintson
I have set the date and time for the event in the interface using datepicker and timepicker respectively. These are stored in the database by converting them into long format. For retrieval, they can be converted back to calendar format(using the function getCalendarFromFormattedLong). The followin