start DummyService only if there is Notification ready

This commit is contained in:
Milos Kozak 2019-06-29 10:59:10 +02:00
parent 6ccf3788be
commit df2ae1c52f

View file

@ -112,6 +112,7 @@ public class PersistentNotificationPlugin extends PluginBase {
} }
private void triggerNotificationUpdate() { private void triggerNotificationUpdate() {
if (updateNotification() != null)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
MainApp.instance().startForegroundService(new Intent(MainApp.instance(), DummyService.class)); MainApp.instance().startForegroundService(new Intent(MainApp.instance(), DummyService.class));
else else