title: Android check firebase connection
body: <p>I am using a firebase database for my Android app.
  When I submit a score there is a message (fragment serverOK) if it works.
  I would like a message for all the other cases. There is one if the databaseEror is non null but how to do if it didn't connect to firebase?</p>
  
  <p>Below is my code:</p>
  
  <pre><code>ref.setValue(resultat, new DatabaseReference.CompletionListener() {
      @Override
      public void onComplete(DatabaseError databaseError, DatabaseReference dataRef) {
          if (databaseError == null) {
             FragmentManager fm3 = getFragmentManager();
             ServerOk serverok = new ServerOk();
             serverok.show(fm3, "serverok");
          } else {
             FragmentManager fm3 = getFragmentManager();
             Server server = new Server();
             server.show(fm3, "server");
          }
      }
  });
  </code></pre>
  
  <p>Thank you for you answers</p>