Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello to all! I have been Using google firebase with my android apps for more than 2 years. Today while developing a new app I am facing a weird problem. I set up my firebase project on Google firebase Console successfully. I write the code to push data on firebase successfully.
But the problem is that No data inserted in firebase and no Error occurs in the console. I searched online a lot but all in vain. I am pasting Screen shot of my firebase console, database rules and my source code. Kindly guide me.'

Java
database = FirebaseDatabase.getInstance();
      dealer_ref = database.getReference("reg_requests");
      
       btnSignup.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                       Dealer dealer = new Dealer();
    
                        dealer.setId(ed.getText().toString());
                        dealer.setMac(getMacAddress(LoginActivity.this));
                        dealer.setRegistered("no");
    
                        String id =    dealer_ref.push().getKey();
    
                         dealer_ref.push().setValue(dealer);
                    
                }
            });


What I have tried:

I have searched online by google. but all in vain
Posted
Comments
David Crow 19-Apr-21 22:54pm    
"...no Error occurs in the console."

How can you confirm this since no error checking is going on? Where are the try/catch blocks?

Have you single-stepped through the code using the debugger?
Saboor8802 20-Apr-21 2:33am    
David Crow. I have tried to Use completion Listeners also but Nothing happened, No Error Occurred. My app does not crashes or hangs. The only problem is that Nothing happened on firebase console. Nor my reference created and nor any data inserted.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900