Testing Google Firebase Connection

Is there a way to test a basic google fire connection from the UNIX command line?

I am working on a jar executable that works fine locally but cannot write to the fire base. So I would like to find a way to test the connection.

I can ping my fire base code from the server.

Thank you,

+3


source to share


2 answers


If you want to see a lot of details about the SDK connection status to Firebase, enable debug logging. You can do this with FirebaseDatabase.getInstance (). SetLogLevel (Level.DEBUG) .



+1


source


Thanks to Doug, that was exactly what I needed. This also helped me identify the problem. I just didn't know about the logging method for firebase.


For others who may have problems:

Import operation: (eclipse provides options in my case)

import com.google.firebase.database.Logger.Level;

      



Set Doug Log Level:

FirebaseDatabase.getInstance(fbconn).setLogLevel(Level.DEBUG);

      

Keep trying to establish a connection: (fbconn is FirebaseApp I set up with my data for firebase)

FirebaseDatabase defaultDatabase = FirebaseDatabase.getInstance(fbconn);
String strCurrentTimestamp = new SimpleDateFormat("MM-dd-yyyy HH:mm:ss a").format(new Date());  
DatabaseReference dataRef = defaultDatabase.getReference().child("Firebase-Connection-Verified");
dataRef.setValue(strCurrentTimestamp);

      

+1


source







All Articles