如何从我的主要活动中触发另一个活动中包含的 AsyncTasks?
public class DatabaseActivity extends Activity {
private class DbReader extends AsyncTask<..> {
@Override
protected List<MyData> doInBackground(..) {
//execute query etc
}
}
private class DbSaver extends AsyncTask<..> {
@Override
protected void doInBackground(MyData data) {
//save to dn
}
}
private class DbRemover extends AsyncTask<..> {
@Override
protected void doInBackground(MyData data) {
//remove in db
}
}
}
如何从 MyApplication 触发扩展 Activitiy?