public void init() {
   XmlResourceParser xrp = getActivity().getResources().getXml(R.xml.search_widget_config);
   if (task == null) {
     task = new ParserTask();
   }
   task.execute(xrp);
 }
    // Executed after the complete execution of doInBackground() method
    @Override
    protected void onPostExecute(String result) {
      ParserTask parserTask = new ParserTask();

      // Start parsing the Google places in JSON format
      // Invokes the "doInBackground()" method of the class ParseTask
      parserTask.execute(result);
    }
    // executes in UI thread after doInBackground
    @Override
    protected void onPostExecute(String result) {
      super.onPostExecute(result);

      // invokes thread for parsing json data
      ParserTask parserTask = new ParserTask();
      parserTask.execute(result);
    }
Ejemplo n.º 4
0
    // Executes in UI thread, after the execution of
    // doInBackground()
    @Override
    protected void onPostExecute(String result) {
      super.onPostExecute(result);

      ParserTask parserTask = new ParserTask();

      // Invokes the thread for parsing the JSON data
      parserTask.execute(result);
    }
Ejemplo n.º 5
0
 @Override
 public void onSuccess(int statusCode, Header[] headers, byte[] responseBytes) {
   BaseApplication.putToLastRefreshTime(getCacheKey(), StringUtils.getCurTimeStr());
   mParserTask = new ParserTask(responseBytes);
   mParserTask.execute();
 }
 private void executeParseTask(byte[] data, boolean fromCache) {
   cacelParserTask();
   mParserTask = new ParserTask(this, data, fromCache);
   mParserTask.execute();
 }