From 26a751977e63e391c54c62c21808cffc1980e141 Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Wed, 18 Jan 2017 22:10:10 +0100 Subject: [PATCH] Pebble: try to improve PebbleKit compatibility (Might help with glance #506) --- .../gadgetbridge/service/devices/pebble/PebbleProtocol.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 121cbb44..b271a0bf 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 @@ -1910,8 +1910,8 @@ public class PebbleProtocol extends GBDeviceProtocol { try { JSONObject jsonObject = (JSONObject) jsonArray.get(i); String type = (String) jsonObject.get("type"); - int key = (int) jsonObject.get("key"); - int length = (int) jsonObject.get("length"); + int key = jsonObject.getInt("key"); + int length = jsonObject.getInt("length"); switch (type) { case "uint": case "int":