public static int readFile(Context context) { try { String configFile = Constants.PHSS_XML_DIR + "appconfig.xml"; Log.i(TAG, "readFile, configFile: " + configFile); mConfigTag = (ConfigTag) JgxxConfigPullService.read(configFile); return READ_SUCCESS; } catch (Throwable e) { e.printStackTrace(); return READ_ERROR; } }
public static boolean writeFile() { if (mConfigTag == null) { return false; } try { String resourcesFile = Constants.PHSS_XML_DIR + "appconfig.xml"; JgxxConfigPullService.write(mConfigTag, resourcesFile); return true; } catch (Throwable e) { e.printStackTrace(); return false; } }