notification improvements (#522)
* correctly filter notifications on Api >= 26, other fixes and refactoring * use correct areNotificationsEnabled method in MainActivity * change notification led color
This commit is contained in:
parent
c502e001d7
commit
0b59b8d0ac
7 changed files with 78 additions and 55 deletions
|
|
@ -201,11 +201,11 @@ public abstract class BaseActivity extends AppCompatActivity {
|
|||
}
|
||||
|
||||
protected void setPullNotificationCheckInterval(long minutes) {
|
||||
JobManager.instance().cancelAllForTag(NotificationPullJobCreator.NOTIFICATIONS_JOB_TAG);
|
||||
long checkInterval = 1000 * 60 * minutes;
|
||||
|
||||
new JobRequest.Builder(NotificationPullJobCreator.NOTIFICATIONS_JOB_TAG)
|
||||
.setPeriodic(checkInterval)
|
||||
.setUpdateCurrent(true)
|
||||
.setRequiredNetworkType(JobRequest.NetworkType.CONNECTED)
|
||||
.build()
|
||||
.schedule();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue