the line parseGroups(datastore.getJSONObject("groups"));in completeSync triggers a getLight and so a checkAuthAndSync(); where it checks for a !initialSyncDone and as the initialSyncDone is set after the parseGroups(datastore.getJSONObject("groups")); is will initiate a new completeSync creating a infinite loop
the line
parseGroups(datastore.getJSONObject("groups"));in completeSync triggers agetLightand so acheckAuthAndSync();where it checks for a !initialSyncDone and as the initialSyncDone is set after theparseGroups(datastore.getJSONObject("groups"));is will initiate a new completeSync creating a infinite loop