How to access data of another firebase project

Viewed 4609

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"
            }
    }
}
3 Answers
Related