[android-developers] Re: Alarm manager for multiple pending intent are not working.

2010-08-17 Thread nomi
Thanks to all for your response, I have solved that problem by passing unique id which is depend on current time:- final int intent_id= (int) System.currentTimeMillis(); PendingIntent pendingIntent =

Re: [android-developers] Re: Alarm manager for multiple pending intent are not working.

2010-08-17 Thread Dianne Hackborn
That's really janky. I'd strongly recommend only posting one alarm, for the next event you have in time, and upon processing that post a new alarm for the following event. This is how most apps work. Your code here is really problematic in how it manages its alarms -- for example if you have

[android-developers] Re: Alarm manager for multiple pending intent are not working.

2010-08-16 Thread skink
nomi wrote: Hi all, In my application i have created pending intent which calls another activity (after 20mins of alarm off) with the help of alarm manger. It should happen each time for each new pending intent or when I call that activity. But when i create one pending intent and after

[android-developers] Re: Alarm manager for multiple pending intent are not working.

2010-08-16 Thread Paul Turchenko
PendingIntent.FLAG* should help you. On Aug 16, 12:44 pm, Kostya Vasilyev kmans...@gmail.com wrote:   Setting an alarm cancels any previous alarms that have the same intent as the new one. In your code, the old and new intents only differ by their extras, which are not considered (I

Re: [android-developers] Re: Alarm manager for multiple pending intent are not working.

2010-08-16 Thread Mitesh Infocus
Ecommerce and Shopping cart Web portal Solutions at www.infocuswebdesigning.com We offer complete web services like, web designing, web development, Flash websites, Flash Intros, E-commerce sites (os commerce, zen cart sites) and much more at very cheap cost. For More Details completed Projects

[android-developers] Re: Alarm Manager Query

2010-01-15 Thread JimmyHoffa
Thanks Mark, I didnt realise that they need re-esablishing so that's good to know. I'm concerned whether the alarms can be removed individually, as in the SDK it appears that they are removed by calling remove and passing in an Intent, which suggests, if one alarm is removed, they all are and

Re: [android-developers] Re: Alarm Manager Query

2010-01-15 Thread Mark Murphy
JimmyHoffa wrote: Thanks Mark, I didnt realise that they need re-esablishing so that's good to know. I'm concerned whether the alarms can be removed individually, as in the SDK it appears that they are removed by calling remove and passing in an Intent, which suggests, if one alarm is

[android-developers] Re: Alarm Manager Query

2010-01-15 Thread JimmyHoffa
I'll look into that, thanks for your input. On Jan 15, 5:09 pm, Mark Murphy mmur...@commonsware.com wrote: JimmyHoffa wrote: Thanks Mark, I didnt realise that they need re-esablishing so that's good to know. I'm concerned whether the alarms can be removed individually, as in the SDK it

[android-developers] Re: Alarm Manager

2009-07-01 Thread Marius Venter
OK, I got it point 1 working, I did not add my PedingIntent.FLAG_CANCEL_CURRENT. However, point 2 still a problem, how can I create a new PendingIntent instead of retrieving the one that is alread there? Thanks On Wed, Jul 1, 2009 at 7:23 AM, Veroland marius.ven...@gmail.com wrote: Hi I have 2

[android-developers] Re: Alarm Manager

2009-07-01 Thread Zod
Hi! When You pass a PendingIntent to the AlarmManager, if there is already one with the same Intent already registered the former will be canceled and the last will be the active one. Two pending intent is the same (in the case of an explicit intent) if the context and the target class is the

[android-developers] Re: Alarm Manager

2009-07-01 Thread Dianne Hackborn
On Wed, Jul 1, 2009 at 9:10 AM, Zod zsolt.ba...@gmail.com wrote: When You pass a PendingIntent to the AlarmManager, if there is already one with the same Intent already registered the former will be canceled and the last will be the active one. Two pending intent is the same (in the case of

[android-developers] Re: Alarm Manager

2009-07-01 Thread iPaul Pro
Does your PendingIntent have a unique requestCode? eg: private final int _id = (int) System.currentTimeMillis(); PendingIntent pendingIntent = PendingIntent.getBroadcast (getApplicationContext(), _id, i, PendingIntent.FLAG_ONE_SHOT); On Jul 1, 9:47 am, Marius

[android-developers] Re: Alarm Manager

2009-07-01 Thread Zod
My bad. I've found the relevant equals code in the source. Marius try the requestCode as iPaul Pro suggested, it also makes two pending intents different (with .equals()) so it won't get removed by AlarmManager. On Jul 1, 6:26 pm, Dianne Hackborn hack...@android.com wrote: On Wed, Jul 1, 2009

[android-developers] Re: Alarm Manager forgets repeating alarms?

2009-02-16 Thread Mariano Kamp
Great Tip, Dianne. Also very helpful for my other issue with notifications (adb shell dumpsys notification). On Sun, Feb 15, 2009 at 11:30 PM, Dianne Hackborn hack...@android.comwrote: You can't expand the size of the log. You can however use adb shell dumpsys alarm to see the current state

[android-developers] Re: Alarm Manager forgets repeating alarms?

2009-02-15 Thread Miguel Paraz
On Feb 15, 6:29 am, Mariano Kamp mariano.k...@gmail.com wrote:   This question is a bit strange, but does anybody know about a common gotcha when using the AlarmManager? And not knowing it sometimes leads to the AlarmManger forgetting alarms?   I have a repeating task that runs once an hour.

[android-developers] Re: Alarm Manager forgets repeating alarms?

2009-02-15 Thread Mariano Kamp
Nope, not until somebody broke into my house and rebooted it during my sleep ;-) The other problem in finding the source of my issue is, that I can't go back very long in the Android log files. My logfile tells me that the alarms weren't fired, but the logfile doesn't contain any more information

[android-developers] Re: Alarm Manager forgets repeating alarms?

2009-02-15 Thread Dianne Hackborn
You can't expand the size of the log. You can however use adb shell dumpsys alarm to see the current state of the alarm manager, which might help. On Sun, Feb 15, 2009 at 9:18 AM, Mariano Kamp mariano.k...@gmail.comwrote: Nope, not until somebody broke into my house and rebooted it during my

[android-developers] Re: Alarm Manager forgets repeating alarms?

2009-02-15 Thread Craig
The documentation states that alarms are not persisted across reboots, so that's something that has to be dealt with by your app. But here's the gotcha that I can't find documented anywhere... It seems that uninstalling the app also clears all set alarms for the package being uninstalled. This