mirror of
https://github.com/bspeice/UNCCGameDay
synced 2025-01-09 15:30:06 -05:00
Clear an Alert after it is clicked
This commit is contained in:
parent
27681948fc
commit
ad38a415fd
@ -5,6 +5,7 @@ import java.util.Date;
|
|||||||
import com.uncc.gameday.R;
|
import com.uncc.gameday.R;
|
||||||
import com.uncc.gameday.activities.Home;
|
import com.uncc.gameday.activities.Home;
|
||||||
|
|
||||||
|
import android.app.Notification;
|
||||||
import android.app.NotificationManager;
|
import android.app.NotificationManager;
|
||||||
import android.app.PendingIntent;
|
import android.app.PendingIntent;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@ -60,7 +61,7 @@ public class Alert {
|
|||||||
builder.setContentIntent(resultPendingIntent);
|
builder.setContentIntent(resultPendingIntent);
|
||||||
|
|
||||||
NotificationManager notificationManager = (NotificationManager) ctx.getSystemService(Context.NOTIFICATION_SERVICE);
|
NotificationManager notificationManager = (NotificationManager) ctx.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
notificationManager.notify(0, builder.build());
|
notificationManager.notify(0, builder.setAutoCancel(true).build());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user