Denisa Corbu Denisa Corbu - 3 years ago 250
Java Question

How to retrieve Firebase data in a (non Android) Java app?

Is there a way to retrieve data from Firebase to a Java application ?

I have an Android application which stores the data in to a Firebase database and I need to read that data in a Java application. I searched over the Internet, but I have not found a clear answer.

//not the URL from browser, the one above the database

FirebaseOptions options = new FirebaseOptions.Builder()

DatabaseReference ref = FirebaseDatabase

//here I try to reference the database and put a value in it

final FirebaseDatabase database = FirebaseDatabase.getInstance();
DatabaseReference ref1 = database.getReferenceFromUrl("");

Answer Source

Accessing the Firebase Database from a regular (non-Android) JVM is considered a server platform by the Firebase documentation. You can find all about it in the Firebase documentation for its server SDKs.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download