How do I not add to the database when the String day is null?
Code:
public boolean insertData(String disciplina,String sala,String dia,String hora){
ContentValues values = new ContentValues();
values.put(COL_2,disciplina);
values.put(COL_3,sala);
values.put(COL_4,dia);
values.put(COL_5,hora);
long result = database.insert(TABLE_NAME,null,values);
if(result==-1){
return false;
}else
return true;
}