title: Storing token values as keys in firebase database
body: <p>I am trying to store token values as keys of the firebase database. Something like this: </p>
  
  <pre><code>    "Token" : {
    "-KoWsMn9rCIitQeNvixr" : {
      "dK1FjGbNr6k:APA91b...S8JK2d69JpO" : "true" 
    },
    ...
  }
  </code></pre>
  
  <p>I am using firebasebaseinstanceid to generate tokens. But the tokens are not stored in the database at all.</p>
  
  <pre><code>public class MyFirebaseInstanceIdService extends FirebaseInstanceIdService {
  
      private static final String REG_TOKEN="REG_TOKEN";
      private DatabaseReference databaseReference=FirebaseDatabase.getInstance().getReference().child("Token");
  
      @Override
      public void onTokenRefresh() {
  
          String recent_token = FirebaseInstanceId.getInstance().getToken();
      Log.d(REG_TOKEN, recent_token);
  
      final DatabaseReference newPost = databaseReference.push();
      newPost.child(recent_token).setValue("true");
  
      }
  }
  </code></pre>
  
  <p>I am new to firebase.Any help is appreciated!</p>