Пример #1
0
  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;
    }
  }
Пример #2
0
  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;
    }
  }