Override isForeground() to return false

This commit is contained in:
Phillip Hsu 2016-09-17 16:23:28 -07:00
parent f88de024b8
commit de761e291a

View File

@ -89,7 +89,15 @@ public class TimerNotificationService extends ChronometerNotificationService {
@Override
protected int getNoteId() {
return R.id.timer_notification_service;
// Since isForeground() returns false, this won't be called by the base class.
return 0;
}
@Override
protected boolean isForeground() {
// We're going to post a separate notification for each Timer.
// Foreground services are limited to one notification.
return false;
}
@Override