package com.powenko.Tutorial_thread_AsyncTask;

import org.w3c.dom.Document;

import android.os.AsyncTask;
import android.os.Bundle;

public class Tutorial_thread_AsyncTaskActivity extends Activity {
    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {
        new ParseXMLFile().execute();

	Document document = null;
    void setDocument(Document document){ this.document = document; }
    private class ParseXMLFile extends AsyncTask<Integer, Integer, Document>{
        @Override public void onPostExecute(Document d){ setDocument(d); }

        protected Document doInBackground(Integer... params) {

            Document parsedXML = null;
            return parsedXML;

sample code:


By admin-powenko

Dr. Powen Ko is a teacher and CEO on LoopTek LLC, and like to teaching. if you need to class, please let PowenKo know, he will love to service and sharing. LoopTek web site is

Leave a Reply