[Resolvido] Android mandar dados realtime firebase

Bom dia pessoal, preciso de um help

Estou programando com o android studio com o firebase.

Eu consigo realizar a auth normalmente aparece os logins dentro do firebase pelo o cadastro
o problema é que queria enviar os id para o realtime porém ele não envia nenhum informação,

package com.iot.mototaxi;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;

public class PassageiroActivity extends AppCompatActivity {
    private EditText mloginText,mSenhaText;
    private Button mLogin,mCadastro;
    private FirebaseAuth mAuth;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_passageiro2);

        mloginText = findViewById(R.id.loginText);
        mSenhaText = findViewById(R.id.senhaText);
        mLogin = findViewById(R.id.login);
        mCadastro = findViewById(R.id.cadastro);


        mLogin.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mAuth = FirebaseAuth.getInstance();
                logar(mloginText.getText().toString(),mSenhaText.getText().toString());
            }
        });


        mCadastro.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mAuth = FirebaseAuth.getInstance();
                cadastro(mloginText.getText().toString(),mSenhaText.getText().toString());

            }
        });

    }

    public void  updateUI(FirebaseUser account) {
        if (account != null) {
            Toast.makeText(this, "U Signed In successfully", Toast.LENGTH_LONG).show();
            startActivity(new Intent(this, PassageiroLoginActivity.class));
        } else {
            Toast.makeText(this, "U Didnt signed in", Toast.LENGTH_LONG).show();
        }


    }


    public void logar(String login,String password){
        mAuth.signInWithEmailAndPassword(login, password)
                .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
                    @Override
                    public void onComplete(@NonNull Task<AuthResult> task) {
                        if (task.isSuccessful()) {
                            // Sign in success, update UI with the signed-in user's information
                            Log.d("Sucesso", "signInWithEmail:success");
                            FirebaseUser user = mAuth.getCurrentUser();
                            updateUI(user);
                        } else {
                            // If sign in fails, display a message to the user.
                            Log.w("Error", "signInWithEmail:failure", task.getException());
                            Toast.makeText(PassageiroActivity.this, "Authentication failed.",
                                    Toast.LENGTH_SHORT).show();
                            updateUI(null);
                        }

                        // ...
                    }
                });
    }

    public void cadastro (String login,String password) {
        mAuth.createUserWithEmailAndPassword(login, password).addOnCompleteListener(PassageiroActivity.this, new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(@NonNull Task<AuthResult> task) {
                if (task.isSuccessful()) {
                    // Sign in success, update UI with the signed-in user's information
                    Log.d("Sucesso", "createUserWithEmail:success");
                    String user_id = mAuth.getCurrentUser().getUid();
                    DatabaseReference current_user_db = FirebaseDatabase.getInstance().getReference().child("Users").child("Passageiro").child(user_id);
                    current_user_db.setValue(true);
                    
                } else {
                    // If sign in fails, display a message to the user.
                    Log.w("Error", "createUserWithEmail:failure", task.getException());
                    Toast.makeText(PassageiroActivity.this, "Authentication failed.",
                            Toast.LENGTH_SHORT).show();
                    updateUI(null);
                }
            }

            });


    }

}

Segue meu build.gradle:

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.android.material:material:1.1.0'
    //implementation 'androidx.annotation:annotation:1.1.2'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
    implementation 'com.google.firebase:firebase-auth:19.2.0'
    implementation 'com.google.firebase:firebase-database:19.2.1'
    implementation 'com.google.firebase:firebase-core:17.2.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

Não apresenta erro somente não joga no banco

mTeste.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                try {
                    FirebaseDatabase database = FirebaseDatabase.getInstance();
                    DatabaseReference myRef = database.getReference("message");
                    myRef.setValue("Hello, World!");
                }
                catch(Exception e){
                    Log.d("asd",e.getMessage());
                }
            }
        });

Olha como está a permissão no seu banco de dados:

Clica em “Regras”
1- image

Depois coloca o read e write como true.
2- image

Obs:

É sempre bom deixar as coisas organizadas para não ter duplicidades.

Gradle:

//Arquivos .Jar
implementation fileTree(dir: 'libs', include: ['*.jar'])

//Test Library
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

//AndroidX + Material Design Library
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.1.0'
//implementation 'androidx.annotation:annotation:1.1.2'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'

//Firebase
implementation 'com.google.firebase:firebase-auth:19.2.0'
implementation 'com.google.firebase:firebase-database:19.2.1'
implementation 'com.google.firebase:firebase-core:17.2.2'

Obrigado pelo o retorno,

Sim as regras estão como true

Utilizando esse Código ele aparece no console

public void mandarDados(){
    FirebaseDatabase database = FirebaseDatabase.getInstance();
    DatabaseReference myRef = database.getReference("message");
    myRef.setValue("Hello, World!");
    Log.d("aqui","aqui");

    myRef.addValueEventListener(new ValueEventListener() {
        @Override
        public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
            String value = dataSnapshot.getValue(String.class);
            Log.d("Main", "Value is: " + value);
        }

        @Override
        public void onCancelled(@NonNull DatabaseError databaseError) {
            Log.w("Main", "Failed to read value.", databaseError.toException());

        }
    });

}

Porém ainda continua não mandando:

Consegui resolver, fiz um projeto do zero e somente utilizei a assistente do android studio fazendo a instalação somente por ele