From ad38a415fd4475e3018396c98c4e2d9bda445aff Mon Sep 17 00:00:00 2001 From: bspeice Date: Wed, 9 Oct 2013 20:54:38 -0400 Subject: [PATCH] Clear an Alert after it is clicked --- src/com/uncc/gameday/alerts/Alert.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/uncc/gameday/alerts/Alert.java b/src/com/uncc/gameday/alerts/Alert.java index 6769798..bff4db9 100644 --- a/src/com/uncc/gameday/alerts/Alert.java +++ b/src/com/uncc/gameday/alerts/Alert.java @@ -5,6 +5,7 @@ import java.util.Date; import com.uncc.gameday.R; import com.uncc.gameday.activities.Home; +import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; @@ -60,7 +61,7 @@ public class Alert { builder.setContentIntent(resultPendingIntent); NotificationManager notificationManager = (NotificationManager) ctx.getSystemService(Context.NOTIFICATION_SERVICE); - notificationManager.notify(0, builder.build()); + notificationManager.notify(0, builder.setAutoCancel(true).build()); } }