I created real time database on firebase, from one android app im sending data and in other app(second separate app different from the app im using for send data, for just retriving if there is change in data) i want to receive that data, how can i do this, because if I'm trying to access like this in onCreate
FirebaseApp.initializeApp(this);
DatabaseReference data = FirebaseDatabase.getInstance()
.getReference("https://my-project.firebaseio.com/nodeName");
I'm getting first initialzeApp also i tried with adding google-service.json from my app that sending data, its saying that its different from project name, how can i do that the firebase structure is like this
{ https://my-project.xxxx somenumbers
{
node{
lat : "value"
lng : "value"
}
}
}
For every Android app that you create in Android Studio that you want to use with a specific Firebase project, you should create an Android app in the Firebase console too. You can do this by going to the overview page of your project and clicking "Add another app".
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