AlarmManager not set from Bootreceiver
<p>because of the fact that the AlarmManager is being cleared when the phone is booted, I created a BootReceiver class that should reset the alarms in this case. 
But even though the other code form this class is executed somehow the AlarmManager doesn't get set, so the AlarmReceiver class is never called. Here is part of my code from the BootReceiver class:</p>

<pre><code>    Calendar Od = Calendar.getInstance();
Od.set(yearOd, monthOd, dayOd, hourOd, minuteOd);
</code></pre>

<p>AlarmManager am = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);</p>

<pre><code>                       int id= rebootCursor.getInt(ToDoDBAdapter.ID_COLUMN);

                       Intent i = new Intent(context, AlarmReceiver.class);
                       i.putExtra("alarm_message", "stavi_vibracii");
                       i.putExtra("doVreme",vremeDo);
                       i.putExtra("doDatum",dateDo);
                       PendingIntent sender = PendingIntent.getBroadcast(context, id, i, PendingIntent.FLAG_UPDATE_CURRENT);
                       am.set(AlarmManager.RTC_WAKEUP, Od.getTimeInMillis(), sender); 
</code></pre>

<p>I should note that I have registered the BootReceiver and AlarmManger in the Manifest file, and everyhting worked fine when setting the alarms within my app. If somebody had similar problems or have the answer to my question, please let me know..
Thank u</p>
