// Path: app/src/main/java/com/liquications/polyphasicsleep/alert/AlarmAlertBroadcastReciever.java
// public class AlarmAlertBroadcastReciever extends BroadcastReceiver {
// 
// 	@Override
// 	public void onReceive(Context context, Intent intent) {
// 		Intent mathAlarmServiceIntent = new Intent(
// 				context,
// 				AlarmServiceBroadcastReciever.class);
// 		context.sendBroadcast(mathAlarmServiceIntent, null);
// 		
// 		StaticWakeLock.lockOn(context);
// 		Bundle bundle = intent.getExtras();
// 		final Alarm alarm = (Alarm) bundle.getSerializable("alarm");
// 
// 		Intent mathAlarmAlertActivityIntent;
// 
// 		mathAlarmAlertActivityIntent = new Intent(context, AlarmAlertActivity.class);
// 
// 		mathAlarmAlertActivityIntent.putExtra("alarm", alarm);
// 
// 		mathAlarmAlertActivityIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// 
// 		context.startActivity(mathAlarmAlertActivityIntent);
// 	}
// 
// }


import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.media.RingtoneManager;
import com.liquications.polyphasicsleep.alert.AlarmAlertBroadcastReciever;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;

			daysStringBuilder.append("Every Day");		
		}else{
			Arrays.sort(getDays(), new Comparator<Day>() {
				@Override
				public int compare(Day lhs, Day rhs) {
					
					return lhs.ordinal() - rhs.ordinal();
				}
			});
			for(Day d : getDays()){
				switch(d){
				case TUESDAY:
				case THURSDAY:
//					daysStringBuilder.append(d.toString().substring(0, 4));
//					break;
					default:
						daysStringBuilder.append(d.toString().substring(0, 3));		
						break;
				}				
				daysStringBuilder.append(',');
			}
			daysStringBuilder.setLength(daysStringBuilder.length()-1);
		}
			
		return daysStringBuilder.toString();
	}

	public void schedule(Context context) {
		setAlarmActive(true);
		

// Path: app/src/main/java/com/liquications/polyphasicsleep/alert/AlarmAlertBroadcastReciever.java
// public class AlarmAlertBroadcastReciever extends BroadcastReceiver {
// 
// 	@Override
// 	public void onReceive(Context context, Intent intent) {
// 		Intent mathAlarmServiceIntent = new Intent(
// 				context,
// 				AlarmServiceBroadcastReciever.class);
// 		context.sendBroadcast(mathAlarmServiceIntent, null);
// 		
// 		StaticWakeLock.lockOn(context);
// 		Bundle bundle = intent.getExtras();
// 		final Alarm alarm = (Alarm) bundle.getSerializable("alarm");
// 
// 		Intent mathAlarmAlertActivityIntent;
// 
// 		mathAlarmAlertActivityIntent = new Intent(context, AlarmAlertActivity.class);
// 
// 		mathAlarmAlertActivityIntent.putExtra("alarm", alarm);
// 
// 		mathAlarmAlertActivityIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// 
// 		context.startActivity(mathAlarmAlertActivityIntent);
// 	}
// 
// }


// Path: app/src/main/java/com/liquications/polyphasicsleep/Alarm.java
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.media.RingtoneManager;
import com.liquications.polyphasicsleep.alert.AlarmAlertBroadcastReciever;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;

			daysStringBuilder.append("Every Day");		
		}else{
			Arrays.sort(getDays(), new Comparator<Day>() {
				@Override
				public int compare(Day lhs, Day rhs) {
					
					return lhs.ordinal() - rhs.ordinal();
				}
			});
			for(Day d : getDays()){
				switch(d){
				case TUESDAY:
				case THURSDAY:
//					daysStringBuilder.append(d.toString().substring(0, 4));
//					break;
					default:
						daysStringBuilder.append(d.toString().substring(0, 3));		
						break;
				}				
				daysStringBuilder.append(',');
			}
			daysStringBuilder.setLength(daysStringBuilder.length()-1);
		}
			
		return daysStringBuilder.toString();
	}

	public void schedule(Context context) {
		setAlarmActive(true);
		

		Intent myIntent = new Intent(context, AlarmAlertBroadcastReciever.class);
