Пример #1
0
    @Override
    protected void onPostExecute(String s) {
      if (resultOk) {
        try {
          mDias = XMLParserSeguimiento.getActivities(s);

          dibujarDias();

        } catch (ParserConfigurationException e) {
          Toast.makeText(aContext, "ParseConfigurationException", Toast.LENGTH_LONG).show();
          actividad.finish();
        } catch (SAXException e) {
          Toast.makeText(aContext, "SAXException", Toast.LENGTH_LONG).show();
          actividad.finish();
        } catch (IOException e) {
          Toast.makeText(aContext, "IOException", Toast.LENGTH_LONG).show();
          actividad.finish();
        } catch (XPathExpressionException e) {
          Toast.makeText(aContext, "XPathExpressionException", Toast.LENGTH_LONG).show();
          actividad.finish();
        }
      } else {
        Toast.makeText(aContext, s, Toast.LENGTH_LONG).show();
        actividad.finish();
      }
      if (dialog.isShowing()) dialog.dismiss();
    }
Пример #2
0
    @Override
    protected String doInBackground(String... strings) {
      try {
        String query = SoapRequestSeguimiento.sendResponse(mProyecto.getId(), mDias);

        String[] result = XMLParserSeguimiento.getResultCode(query).split(";");

        if (result[0].compareTo("0") == 0) {
          resultOk = true;
          return query;
        } else {
          resultOk = false;
          return result[1];
        }
      } catch (Exception e) {
        e.printStackTrace();
        return "Ah ocurrido un error, vuelva a intentarlo";
      }
    }
Пример #3
0
    @Override
    protected String doInBackground(String... strings) {
      try {
        String query = SoapRequestSeguimiento.getActividades(mProyecto.getId());

        String[] result = XMLParserSeguimiento.getResultCode(query).split(";");

        if (result[0].compareTo("0") == 0) {
          resultOk = true;
          return query;
        } else {
          resultOk = false;
          return result[1];
        }

      } catch (Exception e) {
        e.printStackTrace();
        return null;
      }
    }