Please give me a hint why the AlarmManager does not fire.
In my app, the AlarmManager is set after a user action:

   Context c = this.getApplicationContext();
   AlarmManager am =
(AlarmManager)c.getSystemService(Context.ALARM_SERVICE);
   Intent i = new Intent(c, OnAlarmReceiver.class);
   PendingIntent pi = PendingIntent.getBroadcast(c, 0, i, 0);
   am.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + 10000,
pi);

The "+ 10000" is for testing - this numer will be replaced by a bigger
one.
The manifest file contains

    <receiver android:name=".OnAlarmReceiver"></receiver>

And the alarm receiver code is never executed:

 public class OnAlarmReceiver extends BroadcastReceiver {
  @Override
  public void onReceive(Context context, Intent intent) {
  // ...code here is never executed
  }
 }

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