Repeating notification suggestion
<p>I'd like to know whether I'm doing this correctly or not. The user will be able to select how frequent they want notifications. Currently it's set for weekly as you can see in the setrepeating.  </p>

<p>My question is about reboots. I'm under the impression that when the phone reboots that BroadCastReceiver class gets called. So I have to re-initialize each alarm. In my case, do I just copy the doNotification code (from my main) and dump it in the BroadCastReceiver class?</p>

<p>Currently I'm using the setRepeating (in main activity class) like so:</p>

<pre><code>public void doNotifications(String notiType, String projName) {
        //Notification.builder is for 3.0+...
        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, mHour);
        calendar.set(Calendar.MINUTE, mMinute);
        AlarmManager am = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
        Intent intent = new Intent(this, OnBootReceiver.class);
        intent.putExtra("name", projName);
        PendingIntent pendingIntent = PendingIntent.getBroadcast(this, 0, intent, PendingIntent.FLAG_ONE_SHOT);
        //am.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pendingIntent);

        am.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), 604800000, pendingIntent);
    }
</code></pre>

<p>As you can see it calls a BroadCastReceiver class. Code is below:</p>

<pre><code>NotificationManager nm;
int icon = R.drawable.ic_launcher;

CharSequence tickerText = "BodyShots Reminder!";
long when = System.currentTimeMillis();

nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
CharSequence from = "from";
CharSequence message = "message";
PendingIntent contentIntent = PendingIntent.getActivity(context, 0, new Intent(), 0);
Notification notif = new Notification(icon, tickerText, when);
notif.setLatestEventInfo(context, from, message, contentIntent);
nm.notify(1, notif);
</code></pre>
