WINDOWS PHONE 7 REMINDERS

Samuel Fernandes

Total Post:159

Points:1117
Posted by  Samuel Fernandes
 880  View(s)
Ratings:
Rate this:
How strict/loose are Microsoft on approving Windows Phone apps submitted to the marketplace? I know there are tonnes of stories of developers having their iphone apps rejected on unreasonable grounds, and I know Google let you publish just about anything to the Android market...how are your experiences with WM platform?
  1. Mayank Tripathi

    Post:397

    Points:3117
    Re: Windows Phone 7 Reminders

    Since the reminder needs a DateTime its pretty easy. Each application has a max of 50 reminders:

    DateTime dateTime = DateTime.Now; //First Friday at 10am
    for (int i = 0; i < 50; i++)
    {
        Reminder reminder = new Reminder("MyReminder")
        reminder.Content = "Reminder";
        reminder.BeginTime = dateTime.AddDays(i * 7);
    
        ScheduledActionService.Add(reminder);
    }
    

    -or this may work-

    Reminder reminder = new Reminder("MyReminder")
    reminder.Content = "Reminder";
    reminder.BeginTime = DateTime.Now; //First Friday at 10am
    reminder.Content = "Reminder";
    reminder.ExpirationTime = DateTime.Now.AddDays(52 * 7);
    reminder.RecurrenceType = RecurrenceInterval.Weekly; 
    
    ScheduledActionService.Add(reminder);
    

    EDIT

    This is how you get the next day of week

    private DateTime GetNextDay(string dayOfWeek)
    {
        for (int i = 0; i < 7; i++)
        {
            DateTime currentDateTime = DateTime.Now.AddDays(i);
            if (dayOfWeek.Equals(currentDateTime.ToString("dddd")))
                return currentDateTime;
        }
    
        return DateTime.Now;
    }

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!