I'm working on an android application, i'm trying to upload my data into the firebase Realtime Database , but it is not showing up there everything is set correctly, all dependencies are set correctly, application is working properly, there are no errors!. but the problem is data is not getting updated into the Realtime database.

buttonC.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
FirebaseDatabase database = FirebaseDatabase.getInstance();
DatabaseReference myRef = database.getReference("message");
myRef.setValue("Hello, World!");
}
});
firebaser here
If you downloaded the google-services.json before you created the database, the SDK won't be able to determine the correct database URL - since your database instance is not in the default region.
You have two options to fix it in that case:
getInstance() like this: FirebaseDatabase.getInstance("your database URL").getReference()google-services.json after you created the database, and make sure you app uses that file.It's pretty easy to miss this condition right now, as the relevant warning is logged as a debug message. We're working on surfacing the message more explicitly, but in the meantime the above should also work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With