diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java index e7c64cf26..ed56551f3 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java @@ -132,7 +132,6 @@ public class NotificationListener extends NotificationListenerService { source.equals("com.android.systemui") || source.equals("com.android.dialer") || source.equals("com.android.mms") || - source.equals("com.moez.QKSMS") || source.equals("com.cyanogenmod.eleven")) { return; } @@ -149,6 +148,12 @@ public class NotificationListener extends NotificationListenerService { } } + if (source.equals("com.moez.QKSMS")) { + if (!"never".equals(sharedPrefs.getString("notification_mode_sms", "when_screen_off"))) { + return; + } + } + HashSet blacklist = (HashSet) sharedPrefs.getStringSet("package_blacklist", null); if (blacklist != null && blacklist.contains(source)) { return; @@ -167,6 +172,9 @@ public class NotificationListener extends NotificationListenerService { case "com.android.email": notificationKind = NotificationKind.EMAIL; break; + case "com.moez.QKSMS": + notificationKind = NotificationKind.SMS; + break; case "eu.siacs.conversations": notificationKind = NotificationKind.CHAT; break; diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/NotificationKind.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/NotificationKind.java index deda50071..3005a3a60 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/NotificationKind.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/NotificationKind.java @@ -7,5 +7,6 @@ public enum NotificationKind { CHAT, EMAIL, FACEBOOK, + SMS, TWITTER, } diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/PebbleProtocol.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/PebbleProtocol.java index 59be06005..4d7c78136 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/PebbleProtocol.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/PebbleProtocol.java @@ -635,6 +635,10 @@ public class PebbleProtocol extends GBDeviceProtocol { icon_id = PebbleIconID.GENERIC_EMAIL; color_id = PebbleColor.JaegerGreen; break; + case SMS: + icon_id = PebbleIconID.GENERIC_SMS; + color_id = PebbleColor.VividViolet; + break; case FACEBOOK: icon_id = PebbleIconID.NOTIFICATION_FACEBOOK; color_id = PebbleColor.VeryLightBlue;