@Override protected void onStartLoading() { super.onStartLoading(); if (mdata != null) { deliverResult(mdata); } if (mdata == null) { forceLoad(); } DBHelper.getInstance(getContext()).registerObserver(mObserver); }
@Override public List<Student> loadInBackground() { try { mdata = DBHelper.getInstance(getContext()).getStudent(); } catch (Exception e) { e.printStackTrace(); return null; } return mdata; }