我有AsyncTask
一个班级。我希望它在执行时显示进度。但它不打印日志。
private void registerBackground() {
new AsyncTask<Void, Integer, String>() {
@Override
protected String doInBackground(Void... params) {
Log.v("TAGGG", "IN doInBackground");
msg = "Error: ";
return msg;
}
@Override
protected void onProgressUpdate(Integer... progress) {
super.onProgressUpdate(progress);
Log.v("TAGGG", "Progress: " + progress[0] + "%");
}
@Override
protected void onPostExecute(String msg)
{
Log.v("TAGGG", msg);
}
}.execute();
}