From 9f1420e4964296a29309a2536b70fbc546b4b47a 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 d56fdb0d2..95982fa51 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/DebugActivity.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/DebugActivity.java @@ -221,6 +221,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: