title: Cannot connect to Firebase Realtime Database
body: <p>I cannot connect to Firebase realtime database. Here is a simple code which will set value of field <code>message</code> to <code>Hello world</code>.</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      FirebaseDatabase database = FirebaseDatabase.getInstance();
      DatabaseReference myRef = database.getReference("message");
  
      myRef.setValue("Hello, World!");
  }
  </code></pre>
  
  <p>After manually adding project on firebase console I updated:</p>
  
  <ol>
  <li><code>google-services.json</code></li>
  <li>added <code>internet PERMISSION</code></li>
  <li>set rules for <code>public access</code></li>
  <li>added all dependencies in both Project and module <code>build.gradle</code>as instructed</li>
  <li>updated <code>proguard-rules.pro</code> as instructed</li>
  </ol>
  
  <p>Double-checked with Firebase Launch Checklist.</p>
  
  <p>After app launch firebase should update the database but it is showing <code>null</code>.</p>
  
  <p>Please help if there is anything I'm missing to make it work.</p>
  
  <p>P.S. Project is a simple Hello World project in which i added above snippet and   updated others accordingly and code is compiling and running perfectly.</p>