From df9e24e17c89de9bafce55cc31a30552921e4113 Mon Sep 17 00:00:00 2001 From: bspeice Date: Wed, 9 Oct 2013 20:31:07 -0400 Subject: [PATCH] Finally, alerts actually display. --- src/com/uncc/gameday/activities/Home.java | 4 +++- src/com/uncc/gameday/alerts/Alert.java | 10 +++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/com/uncc/gameday/activities/Home.java b/src/com/uncc/gameday/activities/Home.java index f9f16c0..fad1705 100644 --- a/src/com/uncc/gameday/activities/Home.java +++ b/src/com/uncc/gameday/activities/Home.java @@ -1,5 +1,7 @@ package com.uncc.gameday.activities; +import java.util.Date; + import android.app.AlarmManager; import android.app.PendingIntent; import android.content.Context; @@ -9,7 +11,7 @@ import android.content.SharedPreferences.Editor; import android.os.Bundle; import com.uncc.gameday.R; -import com.uncc.gameday.alerts.AlertFetcher; +import com.uncc.gameday.alerts.Alert; import com.uncc.gameday.alerts.AlertService; public class Home extends MenuActivity { diff --git a/src/com/uncc/gameday/alerts/Alert.java b/src/com/uncc/gameday/alerts/Alert.java index 50aa89e..4254108 100644 --- a/src/com/uncc/gameday/alerts/Alert.java +++ b/src/com/uncc/gameday/alerts/Alert.java @@ -18,13 +18,21 @@ public class Alert { private String message; private boolean shown; + // Default constructor + public Alert(){} + + public Alert(Date alarmDate, String message, boolean shown) { + this.setAlarmDate(alarmDate); + this.setMessage(message); + this.setShown(shown); + } + public Date getAlarmDate() { return alarmDate; } public void setAlarmDate(Date alarmDate) { this.alarmDate = alarmDate; } - public String getMessage() { return message; }