@Override
  protected void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    itemsDao = new ItemsDao(this);
    itemsDao.open();
  }
 private void deleteAllItems() {
   itemsDao.deleteAll();
 }
 @Override
 protected void onPause() {
   itemsDao.close();
   super.onPause();
 }
 @Override
 protected void onResume() {
   itemsDao.open();
   super.onResume();
 }