[android-developers] Re: AlarmManager does not fire?

2012-01-27 Thread Rudolf Polzer
I removed the inner classes: I put the classes WakefulIntentService, OnAlarmReceiver and AppService into separate files and now the alarm manager is working. Thanks! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, se

Re: [android-developers] Re: AlarmManager does not fire?

2012-01-27 Thread Kostya Vasilyev
No, that's because the inner class is not static - which is wrong for a manifest-registered receiver. A non-static inner class object can only be instantiated "inside" an instance of the enclosing class, therefore, when the intent fires, the Android framework is unable to instantiate the recei

[android-developers] Re: AlarmManager does not fire?

2012-01-27 Thread Anieeh
I think you have not registered Receiver in Activity with receiver object and intentFilter registerReceiver(android.content.BroadcastReceiver receiver, android.content.IntentFilter filter) Animesh S. Sinha. On Jan 27, 5:00 pm, Rudolf Polzer wrote: > This is the stack when the receiver crashes:

Re: [android-developers] Re: AlarmManager does not fire?

2012-01-27 Thread Mark Murphy
It would need to be a static public inner class. On Fri, Jan 27, 2012 at 6:54 AM, Rudolf Polzer wrote: > Yes, the receiver is an inner class of the activity. > > I changed the receiver line in the manifest file to >     > > Then the alarm fires, but with an exception the debugger can't > display.

[android-developers] Re: AlarmManager does not fire?

2012-01-27 Thread Rudolf Polzer
This is the stack when the receiver crashes: ActivityThread.handleReceiver(ActivityThread$ReceiverData) line: 2616 ActivityThread.access$3100(ActivityThread, ActivityThread $ReceiverData) line: 119 ActivityThread$H.handleMessage(Message) line: 1913 ActivityThread$H(Handler).dispatchMessage(Message

[android-developers] Re: AlarmManager does not fire?

2012-01-27 Thread Rudolf Polzer
Yes, the receiver is an inner class of the activity. I changed the receiver line in the manifest file to Then the alarm fires, but with an exception the debugger can't display. LogCat says: newInstance failed: no () -- You received this message because you are subscribed to the Google Grou

Re: [android-developers] Re: AlarmManager does not fire?

2012-01-26 Thread Kostya Vasilyev
Ah, so your alarm receiver is an inner class within the activity? The name in the manifest is wrong then, and the receiver isn't found when the alarm fires. 27.01.2012 11:08 пользователь "Rudolf Polzer" написал: > "adb shell dumpsys alarm" tells the following about my alarm: > > irp.plan >1

[android-developers] Re: AlarmManager does not fire?

2012-01-26 Thread Rudolf Polzer
"adb shell dumpsys alarm" tells the following about my alarm: irp.plan 17ms running, 1 wakeups 1 alarms: flg=0x4 cmp=irp.plan/.PlanActivity$OnAlarmReceiver which is not present after a call of am.cancel(pi); So I guess that the setting of the alarm works, but the broadcast message does n

Re: [android-developers] Re: AlarmManager does not fire?

2012-01-26 Thread Kostya Vasilyev
Use "adb shell dumpsys alarm" to check the system's list of pending alarms and find out if the alarm was set in the first place. It also seems a little weird to me that you're not using a broadcast action and a matching in the receiver. Maybe that's not the issue, but I'm not sure a broadcast wi

[android-developers] Re: AlarmManager does not fire?

2012-01-26 Thread Rudolf Polzer
I have replaced every c by this.getApplicationContext(). The setting of the alarm is executed, I checked this with the debugger. LogCat says nothing about alarms or broadcast messages during the time of interest and LogCat also displays no warnings. So what is wrong? -- You received this message