From 8080734470e3d9fced3e0503cac46d5ac16e36e9 Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Wed, 21 Sep 2016 21:31:23 +0200 Subject: [PATCH] Pebble: use telegram icon for telegram messages also use the facebook icon for the official facebook app (untested because we would never use facebook) --- .../gadgetbridge/externalevents/NotificationListener.java | 5 +++++ .../freeyourgadget/gadgetbridge/model/NotificationType.java | 1 + .../gadgetbridge/service/devices/pebble/PebbleProtocol.java | 4 ++++ 3 files changed, 10 insertions(+) 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 0c07eee69..d7a4d0eaa 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java @@ -265,6 +265,11 @@ public class NotificationListener extends NotificationListenerService { case "org.thoughtcrime.securesms": notificationSpec.type = NotificationType.CHAT; break; + case "org.telegram.messenger": + notificationSpec.type = NotificationType.TELEGRAM; + break; + case "com.facebook.orca": + case "com.facebook.katana": case "org.indywidualni.fblite": notificationSpec.type = NotificationType.FACEBOOK; break; diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/NotificationType.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/NotificationType.java index 63feca893..49c9cd248 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/NotificationType.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/NotificationType.java @@ -9,4 +9,5 @@ public enum NotificationType { FACEBOOK, SMS, TWITTER, + TELEGRAM, } 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 61a974d40..a4ab599d2 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 @@ -854,6 +854,10 @@ public class PebbleProtocol extends GBDeviceProtocol { icon_id = PebbleIconID.NOTIFICATION_HIPCHAT; color_id = PebbleColor.Inchworm; break; + case TELEGRAM: + icon_id = PebbleIconID.NOTIFICATION_TELEGRAM; + color_id = PebbleColor.PictonBlue; + break; default: icon_id = PebbleIconID.NOTIFICATION_GENERIC; color_id = PebbleColor.Red;