private void getUpdatesFromServer() { Message message = new Message(); message.what = INFO; Bundle bundle = new Bundle(); for (String set : updatableSets) { Log.d("UPDATES", set); bundle.putString(SET, set); message.setData(bundle); handler.sendMessage(message); String jsonString = HTTPUtil.getUpdateFromServer(set); JsonParser.saveJsonToAsset(context, jsonString, set); } }
private void checkForUpdates(String set, int latestVersion) { int setVersion = JsonParser.getJsonSetVersion(context, set); if (setVersion < latestVersion) { updatableSets.add(set); } }