diff --git a/app/src/apkFlavor/java/com/jens/automation2/Rule.java b/app/src/apkFlavor/java/com/jens/automation2/Rule.java index cdc5df75..45538642 100644 --- a/app/src/apkFlavor/java/com/jens/automation2/Rule.java +++ b/app/src/apkFlavor/java/com/jens/automation2/Rule.java @@ -376,7 +376,8 @@ public class Rule implements Comparable if (!oneTrigger.applies(null, context)) return false; } - + + Miscellaneous.logEvent("i", String.format(context.getResources().getString(R.string.ruleCheckOf), this.getName()), String.format("Rule %1$s generally applies currently. Checking if it's really due, yet will be done separately.", this.getName()), 3); return true; } diff --git a/app/src/main/java/com/jens/automation2/receivers/NotificationListener.java b/app/src/main/java/com/jens/automation2/receivers/NotificationListener.java index ee13ad88..92aa50c4 100644 --- a/app/src/main/java/com/jens/automation2/receivers/NotificationListener.java +++ b/app/src/main/java/com/jens/automation2/receivers/NotificationListener.java @@ -89,6 +89,11 @@ public class NotificationListener extends NotificationListenerService// implemen { lastNotification = convertNotificationToSimpleNotification(created, sbn); + if(created) + Miscellaneous.logEvent("i", "New notification", lastNotification.toString(), 5); + else + Miscellaneous.logEvent("i", "Notification removed", lastNotification.toString(), 5); + ArrayList ruleCandidates = Rule.findRuleCandidates(Trigger.Trigger_Enum.notification); for (int i = 0; i < ruleCandidates.size(); i++) {