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 21d87b1..681a925 100644 --- a/app/src/main/java/com/jens/automation2/receivers/NotificationListener.java +++ b/app/src/main/java/com/jens/automation2/receivers/NotificationListener.java @@ -146,13 +146,13 @@ public class NotificationListener extends NotificationListenerService// implemen try { if (extras.containsKey(EXTRA_TEXT)) - text = extras.getString(EXTRA_TEXT).toString(); + text = String.valueOf(extras.getCharSequence(EXTRA_TEXT)); } catch (NullPointerException e) { // in stacked notifications the "surrounding" element has no text, only a title if (extras.containsKey(EXTRA_TEXT) && extras.get(EXTRA_TEXT) != null) - text = extras.get(EXTRA_TEXT).toString(); + text = String.valueOf(extras.getCharSequence(EXTRA_TEXT)); } SimpleNotification returnNotification = new SimpleNotification(); diff --git a/fastlane/metadata/android/en-US/changelogs/144.txt b/fastlane/metadata/android/en-US/changelogs/144.txt index d10ecab..793a4a9 100644 --- a/fastlane/metadata/android/en-US/changelogs/144.txt +++ b/fastlane/metadata/android/en-US/changelogs/144.txt @@ -1,3 +1,4 @@ * Fixed: Crash when triggering a URL without parameter pairs * Fixed: When checking for battery charging type "any" the trigger didn't fire. -* Added: Settings to turn on/off console logging (logcat) \ No newline at end of file +* Fixed: Fixed warnings in logs for formatted notifications +* Added: Setting to turn on/off console logging (logcat) \ No newline at end of file