This commit is contained in:
Victor Shcherb 2014-06-01 14:58:09 +02:00
parent 662425fe09
commit ece75eddbb

View file

@ -32,7 +32,7 @@ public class OsMoGroups implements OsMoReactor, OsmoTrackerListener {
private static final String DELETED = "deleted"; private static final String DELETED = "deleted";
private static final String GROUP_TRACKER_ID = "group_tracker_id"; private static final String GROUP_TRACKER_ID = "group_tracker_id";
private static final String LAST_ONLINE = "last_online"; private static final String LAST_ONLINE = "last_online";
private static final String TRACKS = "tracks"; private static final String TRACK = "track";
private OsMoTracker tracker; private OsMoTracker tracker;
private OsMoService service; private OsMoService service;
@ -288,8 +288,8 @@ public class OsMoGroups implements OsMoReactor, OsmoTrackerListener {
delta.add(device); delta.add(device);
} }
} }
if(obj.has(TRACKS)){ if(obj.has(TRACK)){
JSONArray ar = obj.getJSONArray(TRACKS); JSONArray ar = obj.getJSONArray(TRACK);
JSONObject[] a = new JSONObject[ar.length()]; JSONObject[] a = new JSONObject[ar.length()];
for(int i = 0; i < a.length; i++) { for(int i = 0; i < a.length; i++) {
a[i] = (JSONObject) ar.get(i); a[i] = (JSONObject) ar.get(i);