In Firebase Databases, it has a option of Rules
, by which we can restrict database, and I have made it public.
So my question is, how can i allow some other app, which is not using google-services.json
of my project, to read from this DB.
The following code can read the data from the same firebase project.
FirebaseFirestore.getInstance().collection("tahatest").
addSnapshotListener(new EventListener<QuerySnapshot>() {
@Override
public void onEvent(@Nullable QuerySnapshot queryDocumentSnapshots, @Nullable FirebaseFirestoreException e) {
if(e != null){
Log.d("Firestore", "Exception");
return;
}
if(queryDocumentSnapshots!=null){
List<DocumentSnapshot> snapshotList = queryDocumentSnapshots.getDocuments();
}else{
Log.d("Firestore", "null in onEvent Change");
}
}
});
So in order to read the data from some other project, do i need to define some URL, in place of collection, or i understood it wrongly, and we cannot read the data from some other firebase project.