Firebase Realtime database Write data issue : Iam working on android with firebase database.I have done all the settings correct and injected value to DB.But i have an issue as listed below 
 My code :

    package app.com.test;
    
    import android.support.v7.app.AppCompatActivity;
    import android.os.Bundle;
    import android.view.View;
    import android.widget.Button;
    import android.widget.EditText;
    import android.widget.Toast;
    
    import com.google.firebase.database.DatabaseReference;
    import com.google.firebase.database.FirebaseDatabase;
    
    import java.nio.file.Files;
    
    public class MainActivity extends AppCompatActivity implements View.OnClickListener {
    
        Button b;
        EditText name;
        DatabaseReference rootRef,demoRef;
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            b= findViewById(R.id.button2);
            name= findViewById(R.id.editText);
            //age=findViewById(R.id.editText2);
            rootRef= FirebaseDatabase.getInstance().getReference();
            demoRef=rootRef.child("demo");
    
            b.setOnClickListener(this);
    
    
        }
    
        @Override
        public void onClick(View view) {
    
            String n=name.getText().toString();
    
            //int a = Integer.parseInt(age.getText().toString());
    
    
            demoRef.push().setValue(n);
            //demoRef.push().setValue(a);
            Toast.makeText(this, "DB inserted", Toast.LENGTH_LONG).show();
    
        }
    }

Error :
 W/RepoOperation: setValue at /demo/-L5xSv3ICHg2BFupI7DG failed: DatabaseError: Permission denied


Kindly help me with it
