title: (closed) Create toast message inside a class that extends SQLiteOpenHelper
body: <p>I am trying to show a toast message in the DatabaseHandler class if an item is successfully added or failed to be add into the sqlite database.</p>
  
  <p>I would like to know is it possible for a toast message to be created inside a class that extends SQLiteOpenHelper?</p>
  
  <pre><code>public class DatabaseHandler extends SQLiteOpenHelper {
  
  
  /**
   * Storing item details in database
   * */
  public void addItem(Items item) {    
      ContentValues values = new ContentValues();
      values.put(KEY_IID, item.getIID()); // mysql item id
      values.put(KEY_NAME, item.getName()); // item name
      values.put(KEY_PRICE, item.getPrice()); // item price
      values.put(KEY_CREATED_AT, item.getDate()); // Created At
      values.put(KEY_TYPE, item.getType()); // type
  
      // Inserting Row
      db.insert(TABLE_ITEM, null, values);
  
      //TOAST MESSAGE HERE
  
      db.close(); // Closing database connection
      } else {
          //TOAST MESSAGE HERE
          db.close();
      }  
  }
  </code></pre>