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 ef3d24e0..579237a6 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 @@ -2230,17 +2230,17 @@ public class PebbleProtocol extends GBDeviceProtocol { switch (pebbleCmd) { case APPLICATIONMESSAGE_PUSH: - if (endpoint == ENDPOINT_LAUNCHER) { - LOG.info("got LAUNCHER PUSH from UUID " + uuid); - break; - } - LOG.info("got APPLICATIONMESSAGE PUSH from UUID " + uuid); - + LOG.info((endpoint == ENDPOINT_LAUNCHER ? "got LAUNCHER PUSH from UUID : " : "got APPLICATIONMESSAGE PUSH from UUID : ") + uuid); AppMessageHandler handler = mAppMessageHandlers.get(uuid); if (handler != null) { if (handler.isEnabled()) { - ArrayList> dict = decodeDict(buf); - devEvts = handler.handleMessage(dict); + if (endpoint == ENDPOINT_APPLICATIONMESSAGE) { + ArrayList> dict = decodeDict(buf); + devEvts = handler.handleMessage(dict); + } + else { + devEvts = handler.pushMessage(); + } } else { devEvts = new GBDeviceEvent[]{null}; }