From 424e58071e1b0b110a701889d1c9d153fff9f696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Rebelo?= Date: Tue, 23 Apr 2024 23:49:25 +0100 Subject: [PATCH] Garmin: Fix reply to sms --- .../gadgetbridge/activities/DebugActivity.java | 6 ++++++ .../service/devices/garmin/NotificationsHandler.java | 1 + 2 files changed, 7 insertions(+) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/DebugActivity.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/DebugActivity.java index 48bbd4d7b..2cccaea87 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/DebugActivity.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/DebugActivity.java @@ -220,6 +220,12 @@ public class DebugActivity extends AbstractGBActivity { replyAction.title = "Reply"; replyAction.type = NotificationSpec.Action.TYPE_SYNTECTIC_REPLY_PHONENR; notificationSpec.attachedActions.add(replyAction); + } else if (notificationSpec.type == NotificationType.CONVERSATIONS) { + // REPLY action + NotificationSpec.Action replyAction = new NotificationSpec.Action(); + replyAction.title = "Reply"; + replyAction.type = NotificationSpec.Action.TYPE_WEARABLE_REPLY; + notificationSpec.attachedActions.add(replyAction); } GBApplication.deviceService().onNotification(notificationSpec); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/NotificationsHandler.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/NotificationsHandler.java index 8aef847ff..a38a8c029 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/NotificationsHandler.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/NotificationsHandler.java @@ -347,6 +347,7 @@ public class NotificationsHandler implements MessageHandler { for (NotificationSpec.Action action : notificationSpec.attachedActions) { switch (action.type) { case NotificationSpec.Action.TYPE_WEARABLE_REPLY: + case NotificationSpec.Action.TYPE_SYNTECTIC_REPLY_PHONENR: garminActions.add(encodeNotificationAction(NotificationAction.REPLY_MESSAGES, action.title)); break; case NotificationSpec.Action.TYPE_SYNTECTIC_DISMISS: