// call by Asyntask when finish
  private void onGetJSON_Finish() {
    InstagramPhotoDbAdapter mDB = new InstagramPhotoDbAdapter(MainActivity.this);
    mDB.open();
    int ii = 0;
    for (InstagramPhoto item : mPhotos) {
      if (ii % 2 == 0) item.is_favourite = 1; // random favourite
      ii++;
      // nếu title||img == rỗng thì b�? qua
      if (item.img_thumb_url.equals("") || item.title.equals("")) continue;

      if (mDB.getPhotoByInstagramId(item.id) != null) {
        // đã có trong CSDL
        mDB.updatePhoto(item.id, item);
        Log.w("qd", "Updated Instagram photo id " + item.id + " in SQLite db");
      } else {
        // chưa có
        mDB.createPhoto(item);
        Log.w("qd", "Inserted new Instagram photo id " + item.id + " to SQLite db");
      }
    }
    mDB.close();

    //
    // then call show list view
    showList();
  }