I want to make sure that time is not same.
It's an appointment booking app, so it cannot be the same.
public void clients()
{
String name=t2.getText().toString().trim();
String gender=t1.getText().toString().trim();
String barber=t4.getText().toString().trim();
String dt=t5.getText().toString().trim();
String concerng=t6.getText().toString().trim();
if(!TextUtils.isEmpty(name) || !TextUtils.isEmpty(gender) || !TextUtils.isEmpty(barber) || !TextUtils.isEmpty(dt) || !TextUtils.isEmpty(concerng))
{
String id=databaseReference.push().getKey();
client client=new client(id,name,gender,barber,dt,concerng);
databaseReference.child(id).setValue(client);
Toast.makeText(this, "", Toast.LENGTH_SHORT).show();
}
else
{
Toast.makeText(this, "Something Went Wrong Please Check Again", Toast.LENGTH_SHORT).show();
}