1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-26 10:35:50 +01:00

Passing BarcodeId as value if not null

This commit is contained in:
Gabriele Monaco 2023-09-19 16:52:19 +02:00
parent 89f57243cf
commit 492119f7ee

View File

@ -1452,7 +1452,11 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
JSONObject o = new JSONObject();
o.put("id", card.getId());
o.put("name", renderUnicodeAsImage(cropToLength(card.getName(),40)));
o.put("value", card.getCardId());
if (card.getBarcodeId() != null) {
o.put("value", card.getBarcodeId());
} else {
o.put("value", card.getCardId());
}
o.put("type", card.getBarcodeFormat().toString());
if (card.getExpiry() != null)
o.put("expiration", card.getExpiry().getTime()/1000);