Minor cleanups

master
bspeice 2013-10-09 20:42:44 -04:00
parent df9e24e17c
commit 27681948fc
2 changed files with 4 additions and 5 deletions

View File

@ -49,7 +49,7 @@ public class Alert {
public void displayNotification(Context ctx) {
NotificationCompat.Builder builder = new NotificationCompat.Builder(ctx)
.setSmallIcon(R.drawable.ic_launcher)
.setContentTitle("GameDay Alert")
.setContentTitle(ctx.getString(R.string.app_name))
.setContentText(this.getMessage());
Intent resultIntent = new Intent(ctx, Home.class);

View File

@ -18,13 +18,12 @@ public class AlertService extends IntentService {
@Override
protected void onHandleIntent(Intent intent) {
// Go fetch all the alerts!
Context appContext = GameDay.getAppContext();
AlertDB dbHandle = new AlertDB();
List<Alert> alerts = dbHandle.fetchUnread();
new AlertFetcher().fetchAlerts(this);
List<Alert> alerts = new AlertDB().fetchUnread();
// And then display all of them!
for (Alert a: alerts) {
a.displayNotification(appContext);
a.displayNotification(this);
}
}