From d0c5ffec28e6d3b11d74297b240a9a6744ed7711 Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Wed, 2 Dec 2020 17:07:40 +0100 Subject: [PATCH] Amazfit Bip S: Fix crash with notifictions with only a title (GitNex does this) Probably affects other newer Huami devices --- .../gadgetbridge/service/devices/huami/HuamiSupport.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiSupport.java index 121894387e..33ff0ee331 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiSupport.java @@ -645,6 +645,9 @@ public class HuamiSupport extends AbstractBTLEDeviceSupport { if (notificationSpec.body != null) { message += StringUtils.truncate(notificationSpec.body, 512); } + if (notificationSpec.body == null && notificationSpec.subject == null) { + message += " "; // if we have no body we have to send at least something on some devices, else they reboot (Bip S) + } try { TransactionBuilder builder = performInitialized("new notification");