Back to project page LearnByHeart.
The source code is released under:
Apache License
If you think the Android project LearnByHeart listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.mps.learn.pb.http; //from ww w .j av a 2 s. c o m import android.os.AsyncTask; import android.util.Log; import com.mps.learn.pb.App; import com.mps.learn.pb.model.PhraseBook; public class DataUpdaterTask extends AsyncTask<String, String, PhraseBook> { private DataUpdaterCallback caller; public DataUpdaterTask(DataUpdaterCallback caller) { this.caller = caller; } @Override protected void onPostExecute(PhraseBook result) { super.onPostExecute(result); if (caller != null) { caller.callback(result); } } @Override protected PhraseBook doInBackground(String... arg0) { Log.d(getClass().getSimpleName(),"doInBackground()"); PhraseParser parser = new PhraseParser(); parser.downloadAndSaveIfNecessary(); return parser.parseSavedPhrase(); } }