Fix immediate issues for JSON decoding

Fixes #391
Fixes #392
Fixes #398
This commit is contained in:
Admin
2017-01-25 15:19:46 -06:00
parent 881f739c0b
commit c9d55e26ac
9 changed files with 42 additions and 23 deletions

View File

@@ -152,7 +152,12 @@ public class HarmonyHome implements Home {
myHarmony.startActivity(anActivity);
}
} else if(anItem.getType().trim().equalsIgnoreCase(DeviceMapTypes.HARMONY_BUTTON[DeviceMapTypes.typeIndex])) {
String url = anItem.getItem().toString();
String url = null;
if(anItem.getItem().isJsonObject()) {
url = aGsonHandler.toJson(anItem.getItem());
} else
url = anItem.getItem().getAsString();
if (url.substring(0, 1).equalsIgnoreCase("{")) {
url = "[" + url + "]";
}