From 60b24e004a7bfe63c372f55d6006d597f0f5e237 Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Sat, 19 Sep 2015 21:35:02 +0200 Subject: [PATCH] Pebble: Fix bug for Pebble Intent Notifications not arriving on FW 2.x --- .../gadgetbridge/service/devices/pebble/PebbleProtocol.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 35035478..d5d48c5d 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 @@ -408,7 +408,7 @@ public class PebbleProtocol extends GBDeviceProtocol { @Override public byte[] encodeGenericNotification(String title, String details, int handle, NotificationKind notificationKind) { - return encodeNotification(handle, title, null, details, NOTIFICATION_UNDEFINED, handle != -1, notificationKind); + return encodeNotification(handle != -1 ? handle : mRandom.nextInt(), title, null, details, NOTIFICATION_UNDEFINED, handle != -1, notificationKind); } @Override