// When the activity is closed, save the user's Push preferences
        public override void OnStop()
        {
            base.OnStop();

            bool IsPushEnabledInActivity      = pushEnabled.Checked;
            bool IsQuietTimeEnabledInActivity = quietTimeEnabled.Checked;

            if (IsPushEnabledInActivity)
            {
                PushManager.EnablePush();
            }
            else
            {
                PushManager.DisablePush();
            }

            pushPrefs.SoundEnabled   = soundEnabled.Checked;
            pushPrefs.VibrateEnabled = vibrateEnabled.Checked;

            pushPrefs.QuietTimeEnabled = IsQuietTimeEnabledInActivity;

            if (IsQuietTimeEnabledInActivity)
            {
                // Grab the start date.
                Calendar cal = Calendar.Instance;
                cal.Set(CalendarField.HourOfDay, (int)startTime.CurrentHour);
                cal.Set(CalendarField.Minute, (int)startTime.CurrentMinute);
                Date startDate = cal.Time;

                // Prepare the end date.
                cal = Calendar.Instance;
                cal.Set(CalendarField.HourOfDay, (int)endTime.CurrentHour);
                cal.Set(CalendarField.Minute, (int)endTime.CurrentMinute);
                Date endDate = cal.Time;

                pushPrefs.SetQuietTimeInterval(startDate, endDate);
            }

            this.HandleLocation();
        }