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":