title: android how to insert value in database
body: <p>i have database which work fine.i use edittext to insert data in to database.data inserting is fine working.but with out edittext how can i store value to my database through code.anyone like to help me.
  thanks in advance.</p>
  
  <p>this is my dbhelper class.</p>
  
  <pre><code>public class FoodDbHelper extends SQLiteOpenHelper {
  private static final String DATABASE_NAME = "PKFM.DB";
  private static final int DATABASE_VERSION = 1;
  private static final String CREATE_QUERY =
          "CREATE TABLE "+ Food.NewDishInfo.TABLE_NAME+"("
                  + Food.NewDishInfo.DISH_NAME+" TEXT NOT NULL,"
                  + Food.NewDishInfo.DISH_QUANTITY+" TEXT NOT NULL,"
                  + Food.NewDishInfo.DISH_CALORIE+" INTEGER,"
                  + Food.NewDishInfo.DISH_FAT+" TEXT NOT NULL,"
                  + Food.NewDishInfo.DISH_PROTEIN+" TEXT NOT NULL,"
                  + Food.NewDishInfo.DISH_SUGAR+" TEXT NOT NULL,"
                  + Food.NewDishInfo.DISH_CARBOHYDRATES+" TEXT NOT NULL);";
  public FoodDbHelper(Context context)
  {
      super(context,DATABASE_NAME,null,DATABASE_VERSION);
      Log.e("DATABASE OPERATION","Database created / opened...");
  }
  @Override
  public void onCreate(SQLiteDatabase db) {
      db.execSQL(CREATE_QUERY);
      Log.e("DATABASE OPERATION","Table created...");
  
  
  }
  public void addInformations(String name ,String quantity, Integer calorie, String fat ,
                              String protein,String sugar,String carbohydrates, SQLiteDatabase db){
  
  
      ContentValues contentValues = new ContentValues();
      contentValues.put(Food.NewDishInfo.DISH_NAME,name);
      contentValues.put(Food.NewDishInfo.DISH_QUANTITY,quantity);
      contentValues.put(Food.NewDishInfo.DISH_CALORIE,calorie);
      contentValues.put(Food.NewDishInfo.DISH_FAT,fat);
      contentValues.put(Food.NewDishInfo.DISH_PROTEIN,protein);
      contentValues.put(Food.NewDishInfo.DISH_SUGAR,sugar);
      contentValues.put(Food.NewDishInfo.DISH_CARBOHYDRATES,carbohydrates);
  
      db.insert(Food.NewDishInfo.TABLE_NAME, null, contentValues);
  
  
      Log.e("DATABASE OPERATION","one row inserted...");
  }
  </code></pre>
  
  <p>i do some thing like this but not data inserted</p>
  
  <pre><code>foodDbHelper = new FoodDbHelper(context);
      foodDbHelper.addInformations("Paratha", "1 piece", 260,"8.99 g","5.16 g","2.18 g","38.94 g",sqLiteDatabase);
  </code></pre>